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

Add a fromObject method to FormUrlEncodedRequest #22

Open
KPull opened this issue Sep 7, 2016 · 2 comments
Open

Add a fromObject method to FormUrlEncodedRequest #22

KPull opened this issue Sep 7, 2016 · 2 comments
Milestone

Comments

@KPull
Copy link
Member

KPull commented Sep 7, 2016

Similar to #21, we need to add a fromObject() method to the FormUrlEncodedRequest class. This will serialize the given object into a URL encoded string to be sent with the request.

@KPull KPull added this to the 0.3-BETA milestone Sep 7, 2016
@KPull KPull modified the milestones: 0.3-BETA, 0.4-BETA Nov 6, 2016
@KPull KPull modified the milestones: 0.4-BETA, 0.5-BETA Dec 8, 2016
@KPull KPull modified the milestones: 0.5-BETA, 0.6-BETA Jan 3, 2017
@KPull KPull modified the milestones: 0.6-BETA, 1.0 Mar 31, 2017
@FrelliBB FrelliBB self-assigned this Oct 25, 2017
@FrelliBB
Copy link
Member

How do you propose we do this if given anything that contains some form of nested objects? Should we just take the root object fields and serialize their values with #toString?

@KPull
Copy link
Member Author

KPull commented Oct 25, 2017

Nested field properties will have their names separated with a dot. So:

class Name {
    public String first;
    public String last;
}

class Person {
    public Name name;
    public int age;
}

Person would serialize:

name.first=john&name.last=doe&age=27

@FrelliBB FrelliBB removed their assignment Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants