Ophiucus
Ophiucus

Reputation: 115

GET Request - Invalid HOST - ASP WEB API 2

I uploaded my ASP.NET Web API 2 project onto the web using Azure.

enter image description here

But now that I have uploaded it (it is http), I cant get the GET request to work.

The problem is the Host parameter.

In the URL feild i put: www.website.com/api/Parts

I put the website URL in the Host Value field: www.website.com

enter image description here

This doesnt seem like a CORS issue.

How do I send a GET request to the online API?

Upvotes: 0

Views: 433

Answers (2)

Tomas Chabada
Tomas Chabada

Reputation: 3019

Postman can not override Host header, it is blocked by default. To allow Postman to send this header, install Postman Interceptor extension

Upvotes: 1

Rahul
Rahul

Reputation: 77876

looks like you are testing in POSTMAN. Just remove the Host parameter from header and test/send your API request again.

Upvotes: 1

Related Questions