use of org.apache.http.client.methods.HttpUriRequest in project FastDev4Android by jiangqqlmj.
the class HttpClientStackTest method createPostRequestWithBody.
@Test
public void createPostRequestWithBody() throws Exception {
TestRequest.PostWithBody request = new TestRequest.PostWithBody();
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 FastDev4Android by jiangqqlmj.
the class HttpClientStackTest method createPatchRequestWithBody.
@Test
public void createPatchRequestWithBody() throws Exception {
TestRequest.PatchWithBody request = new TestRequest.PatchWithBody();
assertEquals(request.getMethod(), Method.PATCH);
HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
assertTrue(httpRequest instanceof HttpPatch);
}
use of org.apache.http.client.methods.HttpUriRequest in project FastDev4Android by jiangqqlmj.
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 FastDev4Android by jiangqqlmj.
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 FastDev4Android by jiangqqlmj.
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);
}
Aggregations