gorillalabs / hato

An HTTP client for Clojure, wrapping JDK 11's HttpClient
MIT License
1 stars 0 forks source link

Respect content format negotiation #2

Open chrisbetz opened 4 years ago

chrisbetz commented 4 years ago

Metosin provides a very nice library for content format negotiation: Muuntaja. They claim it's rather fast, also.

hato so far has its own content format conversion (using the :as option). This might define a default behaviour if no content-type is given (or conversion fails), but the 'normal' mode of operation should use the http content-type negotation mechanisms.

chrisbetz commented 4 years ago

http 1.1 specs headers to be case-insenstive. http 2 keeps this, but also states all headers must be lower-cased before encoding...

muuntaja checks uppercased header "Content-Type". Also, it is very much focused on server-side things... So, unfortunately, no luck here.