Skip to content

Permits more flexible handling of request and response bodies - #55

Merged
qxjit merged 1 commit into
mainfrom
qxjit/flexible-body-handling
Oct 8, 2026
Merged

qxjit merged 1 commit into
mainfrom
qxjit/flexible-body-handling

Conversation

@qxjit

@qxjit qxjit commented Oct 7, 2026

Copy link
Copy Markdown
Member

This allow users to define their own custom parsing of request bodies
and their own custom response codes and response bodies when request
parsing fails.

The Request metadata GADTS (body, headers, query params) are now just
records with smart constructors exposed for the cases that the old
constructors represented. The record constructors are exposed so that
users can provide any new existing behavior that the wish.

The various helpers in the StatusCodes module will be replaced by
new versions that take a status code argument, but the old ones are
kept in this commit to allow for easier transition.

This allow users to define their own custom parsing of request bodies
and their own custom response codes and response bodies when request
parsing fails.

The Request metadata GADTS (body, headers, query params) are now just
records with smart constructors exposed for the cases that the old
constructors represented. The record constructors are exposed so that
users can provide any new existing behavior that the wish.

The various helpers in the `StatusCodes` module will be replaced by
new versions that take a status code argument, but the old ones are
kept in this commit to allow for easier transition.
@qxjit
qxjit marked this pull request as ready for review October 7, 2026 18:19

@ysangkok ysangkok left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a great improvement, I think it's good to have more data at the type level because it allows less boilerplate in this case.

@qxjit
qxjit merged commit 271538b into main Oct 8, 2026
5 checks passed
@qxjit
qxjit deleted the qxjit/flexible-body-handling branch October 8, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants