http-types
http-types copied to clipboard
Generic HTTP types for Haskell (for both client and server code)
I am not seeing on obvious way to render the various types into a Byte String that I can send through a socket. How would I render the http version,...
This might be slightly related to #62. Let's say that I have these data types: ``` data Something = Something { field01 :: Text , field02 :: Text } data...
parseByteRanges cannot parse a response like ("Content-Range","bytes */10000") This can occur when a server does not support a requested range. In particular, I was resuming the download of a file,...
In this function: https://github.com/aristidb/http-types/blob/dda6874b98c39b8751d736080ff00a0c5e9d3456/Network/HTTP/Types/Header.hs#L166 The `ByteRanges` are render with an `=` sign. But according to section 14.16 of RFC2616: https://www.ietf.org/rfc/rfc2616.txt When rendering a byte range in a `Content-Range` header, there...
While i'm tackling #66 , i found an interesting problem: `http-type` would create too many `ByteString`: + `parseQueryText/parseQuery` use `urlDecode` which create new `ByteString` s. + `HeaderItem` use `CI ByteString`...
I think it's a good idea to provide pattern synonyms for Header/Method/Status... along aside constants, so people can match them with ease.