richardszalay/mockhttp

Consider mocking HEAD requests automatically

janhohenheim opened this issue · 3 comments

When mocking a GET request with headers, it would be practical if these headers were returned on a HEAD request as well without duplicating the expectations in the mock setup.

Nvm, I misunderstood a thing

Interesting. Does HttpClient do the HEAD requests automatically, or is this something specific to your application?

It's not automatic. I'm manually doing HEAD requests to check the Content-Length header of a resource that I'm going to download in order to preallocate a buffer.