0

I developed an ASP.NET Core 3.1 Api and I always get the HTTP error 400 when testing it via POSTMAN.

When testing the API when is running in debug from Visual Studio, I get the error from POSTMAN while CURL command is getting an OK result.

API running is IIS Express

POSTMAN HTTP 400 Error

CURL command

I got the exact same result when running the API with the dotnet run command.

Is there something wrong with my POSTMAN configuration settings? Can someone help me fixing this issue please ?

2
  • Its saying 5 items in headers, try unchecking/removing them? Commented May 7, 2020 at 13:20
  • They are all unchecked Commented May 7, 2020 at 13:23

2 Answers 2

1

I found the issue. I have to pass the Host header from POSTMAN.

POSTMAN Host header

Sign up to request clarification or add additional context in comments.

Comments

0

Since it is a "GET" request, try typing the URI to your browser instead. If you get the correct result it means that there is something wrong with your postman request parameters, maybe the headers. If the issue persists, try reading this https://learning.postman.com/docs/postman/launching-postman/sending-the-first-request/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.