Skip to content

Fix url encoded requests #101

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

Closed
donny-dont opened this issue Jun 26, 2017 · 9 comments
Closed

Fix url encoded requests #101

donny-dont opened this issue Jun 26, 2017 · 9 comments

Comments

@donny-dont
Copy link

During the migration we lost support for application/x-www-form-urlencoded. Wanted to know if there is any preference on how to fix this @nex3 .

I'm thinking it might make sense to have another constructor for Request.

@nex3
Copy link
Member

nex3 commented Jun 26, 2017

Can we support people just passing a Map<String, String> to the existing constructors?

@donny-dont
Copy link
Author

I'm just not sure how were going to get the content-type correct. Still digging through 0.11.x to see how it might be done.

@nex3
Copy link
Member

nex3 commented Jun 26, 2017

We should be able to manipulate headers in the constructor body—we do similar stuff with the encoding already.

@donny-dont
Copy link
Author

Adding some tests with #102 so this can be implemented properly.

@donny-dont
Copy link
Author

@nex3 are we going to need to add a read method to get back the map?

@nex3
Copy link
Member

nex3 commented Jun 27, 2017

Let's hold off on that for now until we have a more coherent answer for how to represent a map with multiple values for a given key.

@donny-dont
Copy link
Author

@nex3 @kevmoo how would you guys feel if Body contained the content type? By the time _adjustHeaders is hit in message.dart its already a Body so there isn't a way to determine it without modifying that bit.

@nex3
Copy link
Member

nex3 commented Sep 20, 2017

I think we can handle it more cleanly than changing the shape of the type. What if we just add a bool formFields argument to new Message._() and adjustHeaders() to track whether the body was originally a map?

@donny-dont
Copy link
Author

@nex3 you can close this

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 a pull request may close this issue.

2 participants