Task with http request

I’m trying to create a new task that makes an http request with the requests.do() function. But it is giving the error when creating (UI interface):
“Failed to create new task: invalid options; Err: error @1:1-1:23: invalid import path http/requests: error @1:1-1:23: invalid import path http/requests”.
Has anyone done something similar and could give me an example?
InfluxDB Version: 2.0.2
My task creation code:

import “http/requests”

response = requests.do(
method: “POST”,
url: “myurl”,
headers: [“Content-Type”: “application/x-www-form-urlencoded”],
body: [“key1”: “value1”, “key2”: “value2”])

requests.peek(response: response)

@andreia_pavan The version of InfluxDB you’re using is too old. It doesn’t use a version of Flux that includes the requests package. You need to upgrade InfluxDB to at least 2.4 to be able to use this package. You can see the list of compatible InfluxDB versions in the docs.