'Perform a POST api request using chainlink in a smart contract with body?

I don't have much experience using ChainLink so I cannot provide many details. I want to add a body to my post request the code above is just an example:

Chainlink.Request memory request = buildChainlinkRequest(jobId, address(this), this.fulfill.selector);

// Set the URL to perform the POST request on
request.add("post", "https://rinkeby-light.eth.linkpool.io/");
request.add("body", "{\"id\":0,\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[]}");

Any ideas because the code above did not work ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source