Has a timeout been added to this from the IC?
I see the following error if my server takes more than 5 seconds to respond to a request.
I am fairly sure that I do not have any timeouts set on my end. Does the IC have one setup?
If so can we extent it to 60 seconds or turn it off?
“The http_request resulted into error. RejectionCode: SysFatal, Error: Timeout expired”
We do have a timeout of 3s for outstanding HTTP requests. This limit has not changed since we launched the feature and I agree it might be too low for certain applications.
We will discuss raising the request timeout and I will come back to you with an answer.
Good news. We decided to bump the timeout to 30s. If everything goes well it will be included in this week’s release candidate and rolled out next week!
Is there any update if http outcalls support IPv4. Like mentioned above some services only support IPv4. One I am currently working with is the rew relic logs api. Just wondering if there is an update, otherwise I have a work around this as well. Also the error I got was Error: Failet to do wallet call. Caused by: Failet to do wallet call. An error happened during the call: 4: Failed to connect: error trying to connect: tcp connect error: Network is unreachable (os error 101)
Your error looks to be something with reaching the IC itself, not related to outcalls. Did you maybe forget to run dfx start or to select the right network (--network ic)?
HTTPS outcalls to IPv4 destinations are currently not possible, and unfortunately, we have no clear vision as to when this will be possible. The core reason is that all the solutions we discussed were decided to be not secure enough. We are now discussing other solutions (for example, that node providers will provide NAT services), but that might be a long process until we have something working on mainnet.
I am not aware of existing public examples of HTTP POST with this feature. To be able to make a POST request, the remote web server should support some sort of idempotency deduplication of requests. For example using an idempotency-key header.
A self-signed certificate cannot be used. The target URL must have a valid certificate.
Fwiw, I am actively working on creating a code walk through tutorial with sample code for POST. I hope to be done in a few days (just need to wrap up the GET one first).
As I also mentioned in this response, I’m getting a timeout error (which is not related to the transformation function, see the mentioned response for details) when running in the local replica.
What could be the problem?