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: adding parsebody base on header capability #44

Closed
wants to merge 1 commit into from
Closed

feat: adding parsebody base on header capability #44

wants to merge 1 commit into from

Conversation

flozero
Copy link

@flozero flozero commented Oct 18, 2021

First draft pr for #40 and #43 (I think we can make it modular enough to handle multiple header type)

I have created the parseBody function that parse base on the opts send to useBody that check also the opts correspond to the content type header also

Still new to TS and jsdocs so needs to be improve if the solution looks ok

TODO:

  • improve the doc
  • improve typing

@pi0
Copy link
Member

pi0 commented Oct 18, 2021

Hi @f3ltron thanks for PR. I think we can keep using single useBody (inlining logic) (that is also parsing body) to avoid confusing between two utils

@flozero
Copy link
Author

flozero commented Oct 18, 2021

I was thinking about extracting it to accept more header type not supported from the default json one. It's a bit a mess my code still. Will work on it step by step

@pi0
Copy link
Member

pi0 commented Oct 18, 2021

@f3ltron Are you still working on this branch? If not can do refactors and merge :)

@flozero
Copy link
Author

flozero commented Oct 18, 2021

I am not you can do the refactor for sure @pi0

@pi0 pi0 closed this in 73f090b Mar 31, 2022
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.

None yet

2 participants