OmniLayer / omniexplorer

Block Explorer for Omni Protocol
Other
51 stars 50 forks source link

api not work #520

Closed l2toplist closed 2 years ago

l2toplist commented 2 years ago

hi, https://api.omniexplorer.info/v1

http api not work, not allowed? Why?

achamely commented 2 years ago

@l2toplist We need more information to try and help. Can you please provide as much detail about what is not working? Please provide example of the call you are trying to make along with all payloads/data and all responses you are receiving.

l2toplist commented 2 years ago

example

https://api.omniexplorer.info/v2/address/addr/addr=1KYiKJEfdJtap9QX2v9BXJMpz2SfU4pgZw Not Found The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

https://api.omniexplorer.info/v2/address/addr=1KYiKJEfdJtap9QX2v9BXJMpz2SfU4pgZw Method Not Allowed The method is not allowed for the requested URL.

achamely commented 2 years ago

@l2toplist Please read the documentation, that endpoint does not accept get requests only post requests. https://api.omniexplorer.info/v1#request-v2-address-addr

achamely commented 2 years ago

@l2toplist if you read the documentation link more carefully https://api.omniexplorer.info/v1#request-v2-address-addr you will see that the endpoint you are trying to use is https://api.omniwallet.org/v2/address/addr/ and it only supports data received via a POST request as described in the documentation. There is also an example request which you can see/try in the documentation as well.

https://api.omniexplorer.info/v2/address/addr/addr=1KYiKJEfdJtap9QX2v9BXJMpz2SfU4pgZw and https://api.omniexplorer.info/v2/address/addr=1KYiKJEfdJtap9QX2v9BXJMpz2SfU4pgZw are GET requests which are not supported so they are invalid.

If you need additional clarification on the difference between POST and GET take a look at https://www.w3schools.com/tags/ref_httpmethods.asp