Last active
January 2, 2016 13:58
-
-
Save hgoebl/8313248 to your computer and use it in GitHub Desktop.
Example using DavidWebb for Stackoverflow Question 20987525 http://stackoverflow.com/questions/20987525/
This file contains hidden or 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
import com.goebl.david.Webb; | |
import org.json.JSONObject; | |
import org.junit.Test; | |
public class TestSO20987525 { | |
static final String SOAP_ACTION = "http://888topup.com/ImageProcess.svc/UploadImage"; | |
@Test | |
public void dotNetCall() throws Exception { | |
JSONObject imageRequest = new JSONObject(); | |
imageRequest.put("Value", "myValue"); | |
Webb webb = Webb.create(); | |
JSONObject imageResponse = webb.post(SOAP_ACTION) | |
.header("Accept", "*/*") | |
.header("Accept-Encoding", "gzip deflate sdch") | |
.ensureSuccess() | |
.asJsonObject() | |
.getBody(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example using DavidWebb for Stackoverflow Question 20987525