Created
December 4, 2014 19:58
-
-
Save Jzarecta/69467e5e0a3f25731c27 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URL targetUrl = new URL(targetURL); | |
HttpURLConnection httpConnection = (HttpURLConnection) targetUrl.openConnection(); | |
httpConnection.setDoOutput(true); | |
httpConnection.setRequestMethod("POST"); | |
httpConnection.setRequestProperty("Content-Type", "application/json"); | |
String input = "{\"action\":\"authenticate\",\"public-key\":\"\",\"user-key\":\"\"}"; | |
OutputStream outputStream = httpConnection.getOutputStream(); | |
outputStream.write(input.getBytes()); | |
outputStream.flush(); |
Author
Jzarecta
commented
Dec 7, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment