-
-
Couldn't load subscription status.
- Fork 419
Open
Description
Instance HasClient QueryParam' uses this function
encodeQueryParam :: ToHttpApiData a => a -> BS.ByteString
encodeQueryParam = BL.toStrict . toLazyByteString . toEncodedUrlPiecewhere toEncodedUrlPiece is from http-api-data package, where it is documented to be applicable to path segments only, not to query parameters. As a result, if we try to send a simple text string as a parameter,
type API = QueryParam "p" Textthis will be encoded as ?p=a%20+%20b which is wrong, because + is the encoding for the space, and + must be encoded as %2B.
?p=a%20+%20b is interpreted by a standard-conforming server as p = "a b".
p = "a + b" must be encoded as ?p=a+%2B+b
Metadata
Metadata
Assignees
Labels
No labels