sending a custom User-Agent

This commit is contained in:
eugenp 2013-12-22 17:52:06 +02:00
parent 799e702a73
commit 858e786f15
1 changed files with 2 additions and 3 deletions

View File

@ -143,13 +143,12 @@ public class HttpClientLiveTest {
response = client.execute(request);
}
@SuppressWarnings("deprecation")
@Test
public final void givenDeprecatedApi_whenRequestHasCustomUserAgent_thenCorrect() throws ClientProtocolException, IOException {
final DefaultHttpClient client = new DefaultHttpClient();
instance = HttpClients.custom().build();
final HttpGet request = new HttpGet(SAMPLE_URL);
request.setHeader(HttpHeaders.USER_AGENT, "Mozilla/5.0 Firefox/26.0");
response = client.execute(request);
response = instance.execute(request);
}
@Test