Unable to send request body in Http GET method on angular 10

Viewed 442

I want to send empty object in http get request body to work api on angular 10. Our api server need empty request body object in GET request.

I want like this { method: 'get', url: 'http://domain.api.com/api/method?param1=value1', body: { key:value }
}

Note: I dont want to use POST method for send request body.

1 Answers

You should use Post for a payload within a GET request message has no defined semantics; sending a payload body on a GET request might cause some existing implementations to reject the request.

You can read more detail here

Related