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
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.