Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: handle application/x-www-form-urlencoded format on POSTS #371

Merged
merged 5 commits into from
Oct 16, 2024

Conversation

matteo-cristino
Copy link
Contributor

  • chore: add Unsupported Media Type response and refactor the error reponse
  • feat: handle application/x-www-form-urlencoded format on POSTS
  • fix: typo
  • test: content_type metadata field

LOG: Logger<ILogObj>,
e: Error,
statusCode: string,
msg: string | undefined = undefined
Copy link
Member

Choose a reason for hiding this comment

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

Good idea to have a function (response maybe too generic) I would use a type for these fields... So you can have validation over the values

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean to have string literal types for statusCode and msg?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I left msg as a simple string since it can comes from the error and thus it has no prefixed values.

Moreover I would like to extend the use of httpResponse everywhere, but this require more time since it is not obvious how to handle custom response codes and headers (that can comes from the contract metadata). Thus will address it in a different PR

@puria puria merged commit aaaf48b into main Oct 16, 2024
4 checks passed
@puria puria deleted the feat/Content-Type branch October 16, 2024 09:49
github-actions bot pushed a commit that referenced this pull request Oct 16, 2024
# [1.39.0](v1.38.1...v1.39.0) (2024-10-16)

### Features

* handle application/x-www-form-urlencoded format on POSTS ([#371](#371)) ([aaaf48b](aaaf48b))
Copy link

🎉 This PR is included in version 1.39.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants