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
All,

I'm trying to setup the paramters as outlined in the setting up an http connection here (example 1):
https://labs.ig.com/rest-trading-api-guide


I'me using the following code without success:
All,
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:
<code>
String myBody = "identifier: 11111111111, password: xxxxxxxx";
HttpEntity entity = new ByteArrayEntity(myBody.getBytes("UTF-8"));
httpPost.setEntity(entity);;
</code>
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: Fri Apr 26 09:13:56 GMT 2024

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

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

Back to the top