HTTP Request, specific api method before headers and body

Describe the issue/error/question

I need to add api method parameter before headers and body, in past I used Integromat/Make and there was specific place to text using method. Problem is only putting “method” to HTTP Request. Can somebody help me?

example request in php
image

other example:

What is the error message (if any)?

Please share the workflow

Are you saying that the service you’re using takes a map, but a specific key must be at the top?

First, check what your flow is actually sending by changing the url to https://webhook.site

Second, if that’s actually the problem, than I think the only way would be not to use an object, but a string template (backticks), like so

`{
"method":"${your_method}",
"other_keys":"other_values"
}`

and use it as raw data in the http request node

I changed body content type to “Form-Data Multipart” and for example {“method”: “getOrders”} works, but next problem is I need to add more parameters to filter response, for example for method “getOrders” I want to add specific order number

I try use this:

{
“method”: “getOrders”,
“order_id”: “359513190”
}

and it is not filtering. “order_id”: “359513190” is invisible

normally (in Integromat) I fill chosen method in separated text field (before headers) and then use “order_id” in parameters

That’s not right. You’re sending json.

Ok, I change to RAW, response in n8n

[

{

“status”: “ERROR”,

“error_code”: “ERROR_UNKNOWN_METHOD”,

“error_message”: “An empty or unknown method has been used”

}

]

Looks to me that it works as you’ve intended. Problem with Integromat is that it doesn’t tell you what is it exactly sending over the wire and you can’t compare it with what n8n is sending.