Hey! I am very new to coding and need help with a very basic issue. I am using Postman to make the following GET request which is successful (200 OK) but empty: https://rpc.tomochain.com/api/tokens
Why is this? I am attempting to follow these api docs:
https://apidocs.tomochain.com/?shell#get-token-detail
Your patience and guidance is appreciated!
Jablo
Hi @jablokology,
Welcome to the community.
The empty response (200 OK) seems to be expected behavior from given API endpoint you provided. (https://rpc.tomochain.com/api/tokens)
According to the given docs - there is no schema for the responses (empty) when given API endpoint is hit - only status 200 OK is specified for that API.
Thank you for your reply and your welcome Suraj.
I realise I chose a bad example, a better one would be the following which has a response schema: https://rpc.tomochain.com/tokens
To hit this API endpoint succesfully please change the base URL:
From: https://rpc.tomochain.com
To: https://dex.testnet.tomochain.com/api
So your url/endpoint will look something like this:
-> https://dex.testnet.tomochain.com/api/tokens (Please see the attached screenshot for the example response on hitting this endpoint)
- The base URL changes when diffrent API’s are called - see attached screenshots to understand better.
Changed base-URL:
1 Like
That is incredibly helpful. Thank you Suraj for taking your time to explain that to me. I am not sure why the other base url is not responding in the same manner, perhaps I will ask the development team for assistance.
Thank you once again.