Examples of PostMethodWebRequest


Examples of com.meterware.httpunit.PostMethodWebRequest

    public void testBigDecimal() throws Exception {
        JSONObject jsonRequest = new JSONObject(
                "{ \"method\": \"echoBigDecimal\", \"params\": [\"12345.67\"], \"id\": 4}");

        WebConversation wc = new WebConversation();
        WebRequest request = new PostMethodWebRequest(SERVICE_URL,
                new ByteArrayInputStream(jsonRequest.toString().getBytes("UTF-8")), "application/json");
        WebResponse response = wc.getResource(request);

        Assert.assertEquals(200, response.getResponseCode());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.