use of org.apache.http.client.methods.HttpUriRequest in project TaEmCasa by Dionen.
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);
}
use of org.apache.http.client.methods.HttpUriRequest in project TaEmCasa by Dionen.
the class HttpClientStackTest method createPostRequest.
@Test
public void createPostRequest() throws Exception {
TestRequest.Post request = new TestRequest.Post();
assertEquals(request.getMethod(), Method.POST);
HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
assertTrue(httpRequest instanceof HttpPost);
}
use of org.apache.http.client.methods.HttpUriRequest in project TaEmCasa by Dionen.
the class HttpClientStackTest method createOptionsRequest.
@Test
public void createOptionsRequest() throws Exception {
TestRequest.Options request = new TestRequest.Options();
assertEquals(request.getMethod(), Method.OPTIONS);
HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
assertTrue(httpRequest instanceof HttpOptions);
}
use of org.apache.http.client.methods.HttpUriRequest in project TaEmCasa by Dionen.
the class HttpClientStackTest method createHeadRequest.
@Test
public void createHeadRequest() throws Exception {
TestRequest.Head request = new TestRequest.Head();
assertEquals(request.getMethod(), Method.HEAD);
HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
assertTrue(httpRequest instanceof HttpHead);
}
use of org.apache.http.client.methods.HttpUriRequest in project TaEmCasa by Dionen.
the class HttpClientStackTest method createDeprecatedGetRequest.
@Test
public void createDeprecatedGetRequest() throws Exception {
TestRequest.DeprecatedGet request = new TestRequest.DeprecatedGet();
assertEquals(request.getMethod(), Method.DEPRECATED_GET_OR_POST);
HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
assertTrue(httpRequest instanceof HttpGet);
}
Aggregations