fizruk / fizruk/http-api-data

Why don't toQueryParam or toUrlPiece actually url-encode the data?

Open
#79 3 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Haskell
Stars
53
Forks
45
PR merge metrics
No merged PRs in 30d

Description

I was trying to write my own `ToHttpApiData` instance for a newtype wrapper over text, and ended up looking at the [existing instance for `Text`](https://www.stackage.org/haddock/lts-12.1/http-api-data-0.3.8.1/src/Web.Internal.HttpApiData.html#line-491) and was surprised to find that it isn't really url-encoding the data. Why is this the case? Isn't the idea of this type-class to convert a value to be safe for usage in URLs (either as path fragments or query-params)?

If `ToHttpApiData` is not supposed to emit url-encoded stuff, what is the type-class/function/mechanism that does it?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.