1

I have just deployed a smart contract that uses a get request from my chainlink oracle. In my contract it is called as shown below:

     Chainlink.Request memory request = buildChainlinkRequest(jobId, address(this), this.fulfill.selector);
request.add("httpget", "http://xx.xxx.xx.xxx:3000/heartrate/api?code=1&zone=2&timeInterval=1d");

In my Chainlink Oracle, I am receiving the following error:

enter image description here

I suspect it might be to do with I am using httpgetwithunrestrictednetworkaccess as a task parameter in my Chainlink job spec and it is only supported for web types and not runlogs?

builderbob
  • 47
  • 3

1 Answers1

2

In your smart contract, change:

request.add("httpget", "http://xx.xxx.xx.xxx:3000/heartrate/api?code=1&zone=2&timeInterval=1d");

to

request.add("get", "http://xx.xxx.xx.xxx:3000/heartrate/api?code=1&zone=2&timeInterval=1d");

To use adapters in your smart contracts, you can check the chainlink adapters documentation. The httpgetwithunrestrictednetworkaccess uses the same parameter as httpget, which in both cases is "get"

Patrick Collins
  • 11,186
  • 5
  • 44
  • 97