GET request with body/payloads

@Giacomo_Lanzi

Here is the proper response/output:

{
	"url": "/trackDelivery",
	"method": "GET",
	"qs": {},
	"body": {
		"deliveryNote": "{{parameters.deliveryNote}}",
		"courier": "{{parameters.courier}}",
		"deliveryDate": "{{parameters.deliveryDate}}"
	},
	"headers": {
		"Authorization": "Bearer {{connection.accessToken}}",
		"Content-Type":"application/json"
	},
	"response": {
        "output": "{{body}}"
    }
}

And for the HTTP module, and your custom app module, and you include screenshots for all 4 as noted in this image?

And yes, the custom app will have a log option, likely in the base, to mask the authorization.

In your last post including the response, it is showing error 500. So something is definitely formatted incorrectly in your response. But, nearly 100% of the time, if you can duplicate exactly the headers.

I noticed the response you included sometimes includes a chunked encoding type. Try to add this to your header or your request:

		"Connection": "keep-alive"

I’ve had that as an issue before. Custom apps can be very picky with non-standard API’s. It’s a lot of trial and error.

Edit: Also, can you share the API docs for this endpoint and the authorization?

Hi,
Here’s the screenshot from every section in the dev tools:




As for the documentation, here it is:
https://planbproject.it/wp-content/uploads/2022/04/Documentazione-Tecnica-TPM-External-Services.pdf (this endpoint is at page 18)

I cannot share the Authorization for security reason, I hope you’ll understand. I will be more than glad to try everything you suggest me.

Indeed! I already could use the API function in my scenario, but it’s a workaround that costs me 2 operations instead of one to make and I think is not elegant at all.

I am very happy we narrowed down where the problem is, so I can stop bother the API vendor. I will ask why they choose to use GET, though.

I really hope I could do it all with my custom app, since it would be a great satisfaction and the bet way to use the API in general.

Developing custom apps in make is just about the best skill you could develop to solve problems standard apps don’t. They can be highly optimized to solve multi-api call challenges, and can save lots of operations too compared to standard scenarios. Make app design is both an art and a science!

1 Like

Can you share the same screenshots for the native HTTP module that was successful?

Sure,
here they are:




Hum. And can you post your HTTP module configurations?

Yep, here it is:

I created a demo custom app to confirm this issue. Reading through the docs for request specifications, it does mention:

When the method is GET this directive will be ignored.

And

This directive specifies the request body when the method directive is set to anything except GET. If the body is specified and the method directive is set to GET - body is ignored and appropriate Content-Type headers are not set.

So, it’s possible all along that this is a hard limit with custom apps. I’ve reached out for some clarity here, and I’ll keep fiddling with options on my end.

Edit: @Giacomo_Lanzi This likely won’t help, but have you attempted to make a POST request to the same endpoint?

1 Like

Sure! It didn’t work, unfortunately. I had a 404 when tried.

Well, unfortunately Make support has confirmed that it is not possible via custom apps to send a body with a GET request.

in GET. method, only QS or URL is supported. There is no workaround.

That’s really good to know. Unorthodox API design can put people in a difficult place. At least there’s a workaround using the HTTP app.

1 Like

That’s fine, that API is strange and I have a workaround with HTTP request. Hopefully, I am able to place the login request before an Airtable app that catches the delivery numbers to track.

Doing so, I manage to still have no huge amount of operation.

The Airtable app passes tens of bundles to the custom request… I couldn’t afford to double the operations for that :sweat_smile:

Thanks everybody for the support!

1 Like