POST query fails

When I do a POST Basic authentication request for a “http://some.api.url” it fails as 404. Tried out various todo things & workarounds wrt postman post setup/failure from internet. Didn’t helped.
The same thing via curl command line passes Ok. Appreciate much to clarify pls how exactly we do such Basic Auth POST calls via postman ?

Hey @senapati2001

Welcome to the community and thank you for posting a question!! :trophy:

A 404 Not Found response might suggest that the URL that you’re sending the request to might be incorrect or isn’t a route on that API.

Are you able to expand your question to include more details about the request and the endpoint that you’re using please?

Any images of what you’re seeing will also be a great help to people looking at this question.

Thanks Danny

the api service is inside a container on my m/c. From my docker host (my m/c) I can http curl from terminal and all type of results are as expected.
From postman too GET’s are perfect but when doing POST via basic http auth realm it fails. attached are few images of it. The service is on http (non ssl) though.



In your screenshots you are sending a GET.

If your API is RESTful, then I would expect the request you are sending to return the recipe in your data store with id of 13. Given the error message in your second screenshot, I’d say it’s doing just that.

What are you trying to do here? Add a new recipe in the system? If so, a RESTful service would be a POST without specifying an id in the url.

I had mis-attached the required image, my Bad. I hereby share the right POST failure one(s). Along with it I show the Authorization and Headers tab’s contents too.
we can see the 401 seen after hitting send.


Have you manually added the authorization header in addition to using the Authorization tab for the request?

You only need to fill out the Authorization tab. Postman will automatically add the right header to the request when you hit send.

On a side note, if this request is attempting to add a recipe to your system, you might consider moving the parameters to the body of the request instead of in the query string.

From TechnologyConversations:


POST is a request to create a new entity. Content of that entity should be enclosed in the request body.