1

I'm using the Oraclize test query to confirm my oraclize response is empty. Here's a link to the exact test query, which contains the following:

URL  ["json(https://mainnet.infura.io/).result","{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}"]
_

When this same endpoint is queried with the same POST params from Postman like here I get a correct response.

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x421283"
}

Why does Oraclize return an empty response instead?

  • for the record this is a test endpoint, I know you can access the current block number directly from solidity with block.number – okwme Oct 2 '17 at 9:54
1

I got a reply from an Oraclize developer on their github that can be seen here. He says when using the second parameter as a POST payload a whitespace needs to be included at the beginning or end of the JSON object. Here is his updated version of my query returning a correct result 🎉

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.