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

support "application/x-www-form-urlencoded" #4

Closed
jossef opened this issue Mar 1, 2019 · 6 comments
Closed

support "application/x-www-form-urlencoded" #4

jossef opened this issue Mar 1, 2019 · 6 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jossef
Copy link
Owner

jossef commented Mar 1, 2019

Add application/x-www-form-urlencoded encoding support in put and post methods for requests having Map object as body.

Add bodyEncoding to the method signature. the default should be BodyEncoding.JSON if not specified

dynamic body = await Requests.post("https://mydomain.com/api/v1/foo", json: true, body: {"foo":"bar"}, 
bodyEncoding: BodyEncoding.FormURLEncoded);
@jossef jossef added help wanted Extra attention is needed enhancement New feature or request labels Mar 1, 2019
@genesiscz
Copy link
Contributor

I would create a pull request if we agreed on the way this should work, and as I said earlier, I believe it should work, by default, the way http package does. BodyEncoding.JSON should be a configurable, but not default.

@jossef
Copy link
Owner Author

jossef commented Mar 11, 2019

I would create a pull request if we agreed on the way this should work, and as I said earlier, I believe it should work, by default, the way http package does. BodyEncoding.JSON should be a configurable, but not default.

@genesiscz okay, let's default it to BodyEncoding.FormURLEncoded

@genesiscz
Copy link
Contributor

genesiscz commented Mar 28, 2019

I hadn't had enough time to do this properly as it would be my first open source work, if anyone other feels like helping here, feel free to. I may look at it in some free time.

@genesiscz
Copy link
Contributor

Opened a pull request #6

@genesiscz
Copy link
Contributor

Can this have some attention, please?

@jossef
Copy link
Owner Author

jossef commented May 2, 2019

@genesiscz, thanks for the PR!
Will merge and publish a release this weekend

@jossef jossef self-assigned this May 2, 2019
@jossef jossef closed this as completed in f3a2888 May 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants