I was able to get the standard GET, POST, PUT, and DELETE verbs working ok. Some of our clients will need the HEAD verb to work as well.
Essentially, HEAD is just a GET but only the headers are returned. It's generally used to determine the size of the content that could be requested by the corresponding GET, and then providing a download progress bar. It's also good for debugging.
I tried adding a "Head" method to the ApiController subclass, and it compiles, but doesn't return the correct response. I'm getting:
HTTP/1.1 405 Method Not Allowed
Is this supported in this version? Or, are there any plans to support it moving forward? Or, any workarounds?
Lavamantis
0 Points
1 Post
WebAPI support HEAD verb?
Feb 21, 2012 10:53 PM|LINK
I was able to get the standard GET, POST, PUT, and DELETE verbs working ok. Some of our clients will need the HEAD verb to work as well.
Essentially, HEAD is just a GET but only the headers are returned. It's generally used to determine the size of the content that could be requested by the corresponding GET, and then providing a download progress bar. It's also good for debugging.
I tried adding a "Head" method to the ApiController subclass, and it compiles, but doesn't return the correct response. I'm getting:
HTTP/1.1 405 Method Not Allowed
Is this supported in this version? Or, are there any plans to support it moving forward? Or, any workarounds?
head 405