haskell-servant / haskell-servant/servant

Return `Accept` header when `Bad Content Type` is reported...

Open
#1,655 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Haskell
Stars
2k
Forks
427
Avg merge
2d 23h
Merged PRs (30d)
5

Description

According to HTTP standard, when "Bad content type" is reported, we should send a list of accepted content types for the given address in `Accept` header.
This could be realized by a walk over the type with a given path.

This allows for content negotiation and speeds up debugging expectations of API servers:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation#the_accept_header

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.