POST request only works with the desktop agent, on cloud agent I get error 400

I deployed a Flask endpoint on google cloud platform, the GET Request works on either the cloud or desktop agent but but the POST only works on desktop agent, please help.

Hi @arndom,

Welcome to the community.

With the information provided, it will be difficult to troubleshoot. Can you provide some details around the 400 error you are getting when using the Cloud Agent? Such as the response body? That can help figure out whats wrong.

Additionally you can share the complete request from both the Desktop and Cloud agents to see if they differ in any way. Its possible you can be missing a header. However without more details, I’m just speculating.

Orest

Thanks, It’s sort of working right now(had to tweak some things in the flask code) but now the request times out on cloud agent but is still running on the server, I tried keep alive with a timeout of 1000 secs but it doesn’t seem to do anything.

There’s no response

Here’s the request header

`Keep-Alive: timeout=1000, max=1000
 User-Agent: PostmanRuntime/7.26.10
 Accept: */*
 Cache-Control: no-cache
 Postman-Token: 18f986cb-9abd-4c9e-b77c-e7089db45767
 Host: 35.184.178.128:5000
 Accept-Encoding: gzip, deflate, br
 Connection: keep-alive`

Hey @arndom,

What could be helpful is to use Postman to generate cURL requests to see if there are any differences in the requests sent.

Steps to generate cURL request in Postman:

This might be helpful to spot any differences.

Another thing you can try is - once you send the request it will be logged in Postman’s console, you can then expand the request and get a detailed look of what exactly was sent, the user-agents will be listed under the network tab, you can try attaching screenshots here for reference.

I am also leaning towards the fact that there is an issue with some of the headers.
Server-side do you know if there’s anything specific that you need to have present in the headers.

The fact that You used to receive 400 response code means that you were able to reach the server, but seems like the request is not what the server expects.

Also if you have access to the server I would suggest you to console log the requests you receive as this might be helpful to find any discrepancies .

Best Regards,
Atanas

So on the postman console with the cloud agent I get this

with the desktop agent I get this

they have the same headers expect content type and length which is generated by postman.

on logging the server both requests work without any issue

image

the request has been timed out no more error 400, I found a fix for that .

The Keep alive header doesn’t seem to be working in the cloud agent. it takes about 13mins to get the response done so that may be an issue for the cloud agent, just speculating since I can’t see any issue

I intended to submitted the API for the Hackathon but there might not be enough time because of this issue.

Hi there,
I am new to Postman application.

Currently i am trying to connect my local server to postman but it throwing me an error that says…

“Cloud Agent Error: Can not send requests to localhost. Select a different agent. Use Postman’s Desktop Agent”

In my system, i can’t download this software due to some restriction issues, so I will be working on Postman Web only.

Please share any feasible solution to fix this problem.

1 Like

Getting the same issue, when I look in the console I have the error message: Error: You are not authorized to send a request through the cloud agent.

1 Like

Oh no! Same! Any assistance here would be amazing :pray:

As far as I have been able to work out, it is because you can not actually Send from a Postman Collection that has been shared in the public explore section, i.e. a public workspace. The only way I got round this was to fork the public collection to my own workspace.

I have this same issue and cant find a solution, if you managed to get away with that please let me know too.
Thanks