Search in sources :

Example 16 with HttpPut

use of org.apache.http.client.methods.HttpPut in project android-volley by mcxiaoke.

the class HttpClientStackTest method createPutRequestWithBody.

@Test
public void createPutRequestWithBody() throws Exception {
    TestRequest.PutWithBody request = new TestRequest.PutWithBody();
    assertEquals(request.getMethod(), Method.PUT);
    HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
    assertTrue(httpRequest instanceof HttpPut);
}
Also used : HttpUriRequest(org.apache.http.client.methods.HttpUriRequest) HttpPut(org.apache.http.client.methods.HttpPut) TestRequest(com.android.volley.mock.TestRequest) Test(org.junit.Test)

Example 17 with HttpPut

use of org.apache.http.client.methods.HttpPut in project android-volley by mcxiaoke.

the class HttpClientStackTest method createPutRequest.

@Test
public void createPutRequest() throws Exception {
    TestRequest.Put request = new TestRequest.Put();
    assertEquals(request.getMethod(), Method.PUT);
    HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
    assertTrue(httpRequest instanceof HttpPut);
}
Also used : HttpUriRequest(org.apache.http.client.methods.HttpUriRequest) HttpPut(org.apache.http.client.methods.HttpPut) HttpPut(org.apache.http.client.methods.HttpPut) TestRequest(com.android.volley.mock.TestRequest) Test(org.junit.Test)

Example 18 with HttpPut

use of org.apache.http.client.methods.HttpPut in project androidquery by androidquery.

the class AbstractAjaxCallback method httpPut.

private void httpPut(String url, Map<String, Object> params, AjaxStatus status) throws ClientProtocolException, IOException {
    AQUtility.debug("put", url);
    HttpEntityEnclosingRequestBase req = new HttpPut(url);
    httpEntity(url, req, params, status);
}
Also used : HttpEntityEnclosingRequestBase(org.apache.http.client.methods.HttpEntityEnclosingRequestBase) HttpPut(org.apache.http.client.methods.HttpPut)

Example 19 with HttpPut

use of org.apache.http.client.methods.HttpPut in project camel by apache.

the class RestletMultiMethodsEndpointTest method testPutMethod.

@Test
public void testPutMethod() throws Exception {
    HttpResponse response = doExecute(new HttpPut("http://localhost:" + portNum + "/users/homer"));
    assertHttpResponse(response, 200, "text/plain", "PUT");
}
Also used : HttpResponse(org.apache.http.HttpResponse) HttpPut(org.apache.http.client.methods.HttpPut) Test(org.junit.Test)

Example 20 with HttpPut

use of org.apache.http.client.methods.HttpPut in project camel by apache.

the class Olingo2AppImpl method update.

@Override
public <T> void update(Edm edm, String resourcePath, Object data, Olingo2ResponseHandler<T> responseHandler) {
    final UriInfoWithType uriInfo = parseUri(edm, resourcePath, null);
    writeContent(edm, new HttpPut(createUri(resourcePath, null)), uriInfo, data, responseHandler);
}
Also used : HttpPut(org.apache.http.client.methods.HttpPut)

Aggregations

HttpPut (org.apache.http.client.methods.HttpPut)153 StringEntity (org.apache.http.entity.StringEntity)89 CloseableHttpResponse (org.apache.http.client.methods.CloseableHttpResponse)50 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)40 HttpResponse (org.apache.http.HttpResponse)29 Test (org.junit.Test)29 JsonNode (com.fasterxml.jackson.databind.JsonNode)27 Deployment (org.activiti.engine.test.Deployment)27 HttpPost (org.apache.http.client.methods.HttpPost)19 HttpGet (org.apache.http.client.methods.HttpGet)17 IOException (java.io.IOException)16 CloseableHttpClient (org.apache.http.impl.client.CloseableHttpClient)16 HttpDelete (org.apache.http.client.methods.HttpDelete)14 HttpEntity (org.apache.http.HttpEntity)13 URI (java.net.URI)12 HttpUriRequest (org.apache.http.client.methods.HttpUriRequest)12 HttpHead (org.apache.http.client.methods.HttpHead)11 Execution (org.activiti.engine.runtime.Execution)10 ProcessInstance (org.activiti.engine.runtime.ProcessInstance)9 HttpEntityEnclosingRequestBase (org.apache.http.client.methods.HttpEntityEnclosingRequestBase)9