Custom User-Agent in HttpClient 4 1. Overview This quick tutorial will show how to send a custom User-Agent header using Apache HttpClient 4. 2. Setting User-Agent on the HttpClient ==== 2.1. Before HttpClient 4.3 When working with older versions of Http Client (pre 4.3), setting the value of the User-Agent… Continue Reading httpclient-user-agent-header

Posting with HttpClient 1. Overview In this tutorial – we’ll POST with the HttpClient 4 – using first authorization, then the fluent HttpClient API. Finally, we’ll discuss how to Upload a File Using Httpclient. Further reading: Advanced HttpClient Configuration HttpClient configurations for advanced use cases. Read more → HttpClient 4… Continue Reading httpclient-post-http-request

StackExchange REST Client with Spring and RestTemplate HTTP Client-Side Spring Web HttpClient RestTemplate This article will cover a quick side-project – a bot to automatically tweet Top Questions from the various Q&A StackExchange sites, such as StackOverflow, ServerFault, SuperUser, etc. We will build a simple client for the StackExchange API… Continue Reading tweeting-stackexchange-with-spring-social-part-1

HttpClient 4 – Cancel Request 1. Overview This quick tutorial shows how to cancel a HTTP Request with the Apache HttpClient 4. This is especially useful for potentially long running requests, or large download files that would otherwise unnecessarily consume bandwidth and connections. If you want to dig deeper and… Continue Reading httpclient-cancel-request