Well I have a strange problem with executing a "DELETE" HTTP request in Spring.
I have a controller method which I have mapped a DELETE request to:
@RequestMapping(value = "/{authorizationUrl}",method=DELETE)
public void deleteAuthorizationServer(
@RequestHeader(value="Authorization") String authorization,
@PathVariable("authorizationUrl") String authorizationUrl)
throws IOException {
System.out.println("TEST");
}
The controller is mapped using @RequestMapping("/authorization_servers");
When I send a request through my DEV Http Client, I am getting the response : 405 Http method DELETE is not supported by this URL
.
The request looks like this:
DELETE localhost:8080/authorization_servers/asxas
Headers:
Authorization: "test:<stuff>"
If someone can look into this and help me, I would be grateful
@RequestMapping("/authorization_servers")
– Suspensionrequired=false
to@RequestHeader
? – Nightshadelocalhost:8080/authorization_servers/
– Suspension