You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 24, 2020. It is now read-only.
{"error": "Error decoding faucet info, json: cannot unmarshal string into Go value of type int."}"
Thank you.
P.S. I'm using official php client, that validates address and amount before issue the request. So it might be client validation bug (must also check for correct type) or backend's bug because it seems nothing special to convert "10" to 10 even in Go.
The text was updated successfully, but these errors were encountered:
I have not tried to reproduce it yet but it could be becuase you are using an string for the amount instead of an integer. Could you tried casting to integer if that is the case?
I think the problem must be in the client. The request body should be:
POST https://api.blockcypher.com/v1/bcy/test/faucet?token=MY_TOKEN
Request: string(62) "{"address":"BvngfRB42j2125T6U84hAWUphYDjJg4zpp","amount":"10"}"
Response:
string(453) "HTTP/1.1 400 Bad Request
Server: nginx/1.11.10
Date: Tue, 25 Apr 2017 13:18:49 GMT
Content-Type: application/json
Content-Length: 97
Connection: keep-alive
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept
Access-Control-Allow-Methods: GET, POST, PUT, DELETE
Access-Control-Allow-Origin: *
X-Ratelimit-Remaining: 192
{"error": "Error decoding faucet info, json: cannot unmarshal string into Go value of type int."}"
Thank you.
P.S. I'm using official php client, that validates address and amount before issue the request. So it might be client validation bug (must also check for correct type) or backend's bug because it seems nothing special to convert "10" to 10 even in Go.
The text was updated successfully, but these errors were encountered: