Share feedback, ideas and get community help

Updated 3 months ago

HTTP Request Form-data param

Hi every Body ,

I access an ERP and get information from there, using postman all works fine.
I am trying convert the request to HTTP Request.
The dificulty that I am facing is , I dont ( know how ) find the parameters that correspond to the CURL:

curl --location 'https://myerp.com.br/api/funcaodaapi/' \
--form 'token="sdfhlkasjdhflkajsdhfkljashdfkjahskdjf"' \
--form 'app="appname"' \
--form 'cpfcnpj="11122233344455"' \
--form 'senha="password"' \
--form 'contrato="123"'

If someone knows how to configure in the HTTP Request will help me a lot.
Thank you in advance.

Best regards

Wilson
R
W
B
4 comments
You should just be able to set 'Headers' to a key of "Content-Type" and value to "application/x-www-form-urlencoded". Then, in the Body section, toggle on Custom Body and put in your JSON data with the values:

{
"token": "sdfhlkasjdhflkajsdhfkljashdfkjahskdjf",
"app": "appname",
"cpfcnpj":"11122233344455",
"senha: "password",
"contrato": "123"
}
Thank you for your answer.
I had tried this configuration before, but this field has a different performance and need a specific configuration.
Using a nodejs server I am able to create a request, in the "http request" from typebot always return error.
This parameter --form is not a Body json information, thats the reason that it not works

{
"statusCode": 500,
"data": {
"message": "Error from Typebot server: RequestError: Expected value which is predicate returns truthy for any value, received values of types string."
}
}
Send a screenshot for your block configuration
I repeat the test and now worked, I will do more tests and inform you
Add a reply
Sign up and join the conversation on Discord