Bitcoin Forum
May 12, 2024, 03:03:18 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Other / Beginners & Help / Re: Searching JAVA-Coder for BTC on: June 19, 2011, 10:53:45 AM
Vector: Thanks a lot, I already have a POST Request working, but there seems to be some issue with the Post-Parameters...

2  Other / Beginners & Help / Re: Searching JAVA-Coder for BTC on: June 18, 2011, 06:03:22 PM
Nobody interessted??
3  Other / Beginners & Help / Searching JAVA-Coder for BTC on: June 16, 2011, 06:29:04 PM
Hi there,

As my time is currently limited, I'm looking for someone to solve one small problem in my software:

I need a Java-Method to Access MT-Gox API via POST-Requests. The interface looks like this:

public String performPOST(final String _url, final String _user, final String _pwd)
and the method should return the JSON, mtgox returns.
For example:
https://mtgox.com/code/getFunds.php
returns {"usds":XXXXXX,"btcs":XXXXXX}

No other method is required, the JSON is processed somewhere else.

Would be glad to get an offer and a solution Wink
4  Bitcoin / Development & Technical Discussion / Re: Accessing MT Gox API from Java on: June 14, 2011, 07:29:31 PM
MtGox requires POST requests for all API-Actions, which need a login.  Only the three open action can be performed with a get-Request.
5  Bitcoin / Development & Technical Discussion / Accessing MT Gox API from Java on: June 13, 2011, 07:37:14 PM
Hi there,

I currently try to access the MT Gox API from a Java-Tool. No matter which code I use, it always results in a "{"error":"Not logged in."}" error. Therefore I hope, that you can help me...

I think, the following code should result in a correct POST-Request.
_url = https://mtgox.com:443/code/getFunds.php
_postcontent = name=blah&pass=blah

Code:
urlConnection = (HttpsURLConnection) (new URL(_url).openConnection());
           
urlConnection.setDoInput(true);
urlConnection.setDoOutput(true);
           
urlConnection.setRequestMethod("POST");
urlConnection.setRequestProperty("Content-length", String.valueOf(_postcontent.length()));
urlConnection.setRequestProperty("Content-Type", "application/x-www- form-urlencoded");

dataOutputStream = new DataOutputStream(urlConnection.getOutputStream());
LOGGER.debug("writeBytes {}", _postcontent);
dataOutputStream.writeBytes(_postcontent);
dataOutputStream.flush();
dataOutputStream.close();

I would be very happy, if somebody could help me out of this!

Thanks a lot.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!