Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Setting a body in an http POST using apache httpClient
Setting a body in an http POST using apache httpClient [message #1469793] Tue, 11 November 2014 22:36
LHXS Mising name is currently offline LHXS Mising nameFriend
Messages: 20
Registered: April 2011
Junior Member

I'm trying to setup the paramters as outlined in the setting up an http connection here (example 1):

I'me using the following code without success:
Trying to set a POST in Java using apache httpClient libraries.
Any idea how to set the body in line with the REST API?
I've got something like:
String myBody = "identifier: 11111111111, password: xxxxxxxx";
HttpEntity entity = new ByteArrayEntity(myBody.getBytes("UTF-8"));
any ideas what's wrong?

Many thanks
Previous Topic:How can I add a Classpath Variable in code
Next Topic:Eclipse for WebLogic 10.3.6
Goto Forum:

Current Time: Tue Mar 05 12:11:41 GMT 2024

Powered by FUDForum. Page generated in 0.01416 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top