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

Proposals to provide encode/decode only form url body #410

Closed
wingyplus opened this issue Aug 23, 2020 · 2 comments · Fixed by #411
Closed

Proposals to provide encode/decode only form url body #410

wingyplus opened this issue Aug 23, 2020 · 2 comments · Fixed by #411

Comments

@wingyplus
Copy link

I have working on create a client for https://developers.line.biz/en/reference/social-api/#issue-access-token. I found that the api receive a request as a form url encoded and response it as a json format. Tesla provide encode/decode only for json data format but form uri doesn't. The proposals provide 2 new middleware to do exactly the same Middleware.EncodeJson and Middleware.DecodeJson does but for Middleware.FormUrlencoded.

@teamon
Copy link
Member

teamon commented Aug 23, 2020

The decoding part is guarded by content type, but I agree it makes sense to have separate EncodeFormUrlencoded and DecodeFormUrlencoded middlewares. I'd be happy to accept a MR.

@wingyplus
Copy link
Author

Thanks. Will send a PR tomorrow.

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

Successfully merging a pull request may close this issue.

2 participants