Skip to content
This repository has been archived by the owner on Oct 29, 2021. It is now read-only.

No type instance AddSetCookieApi for NoContentVerb #177

Open
ChickenProp opened this issue Oct 9, 2020 · 0 comments
Open

No type instance AddSetCookieApi for NoContentVerb #177

ChickenProp opened this issue Oct 9, 2020 · 0 comments

Comments

@ChickenProp
Copy link

It seems there's no way to add Auth to an API with NoContentVerb (added in servant-0.17) because that type instance is missing.

To be clear, it's missing for good reason. You can't add headers to a NoContentVerb. That might need to be fixed upstream before this library can do anything. Still, I would have found it helpful to have some mention of the problem in this issue tracker, so I'm mentioning it.

As a workaround, I've added this instance in my own package,

type instance AuthI.AddSetCookieApi (Servant.NoContentVerb method)
  = Servant.Verb
      method
      204
      '[Servant.JSON]
      (AuthI.AddSetCookieApiVerb NoContent)

but that restricts the content-types, which NoContentVerb shouldn't do.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant