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

Making a POST with RequestParams & HttpEntity #1004

Closed
davroux opened this issue Oct 20, 2015 · 1 comment
Closed

Making a POST with RequestParams & HttpEntity #1004

davroux opened this issue Oct 20, 2015 · 1 comment
Assignees
Milestone

Comments

@davroux
Copy link

davroux commented Oct 20, 2015

I need to make POST request with a JSONObject into the body.

So for this, I use a StringEntity but I also need to specify a RequestParams.

I don't find any methods to pass these both object. We can only pass a HttpEntity or a RequestParams not both.

How can I do this?

@davroux davroux changed the title Making a POST request Making a POST with RequestParams & HttpEntity Oct 20, 2015
@sanjayharan
Copy link

I also needs to do same.
I need to post the file object , how can do with entity .

params.put("fileupload", myFile, "application/gzip");

How can I do with Entity?

StringEntity entity = new StringEntity(jsonObject.toString());

Thanks

@smarek smarek added this to the 1.5.0 milestone Nov 17, 2015
@smarek smarek self-assigned this Nov 17, 2015
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

4 participants