Set a custom User-Agent header on the client (or on individual requests) with the Apache HttpClient.
Also find me here:
Baeldung Author
Eugen Paraschiv
I’m a software engineer with a passion for REST, TDD and clean code, Web Security and Data Mining. Baeldung is about all of these and more.
Here's what I've written (so far):
Baeldung on Java
- All
- Weekly Review (152)
- Spring (33)
- Spring Security (29)
- REST (23)
- Java IO (22)
- HTTP Client-Side (20)
- Jackson (17)
- Data (17)
- Java Collections (12)
- Java (9)
- Testing (8)
- Spring MVC (7)
- Maven (7)
- Spring Persistence (6)
- Persistence (6)
- Java List (6)
- JPA (6)
- Java String (5)
- Spring Web (4)
- Spring Boot (4)
- Spring Data (3)
- JSON (3)
- Security (2)
- Meta (2)
- Java Map (2)
- Java Array (2)
- Cloud (2)
- News (1)
- Java Numbers (1)
- Java Concurrency (1)
- IDE (1)
- Core Java (1)
- Artificial Intelligence (1)
- Architecture (1)
Jackson – Change Name of Field
Jackson – Change the name of a field to adhere to a specific JSON format.
Serialize Only Fields That Meet a Custom Criteria With Jackson
Only serialize fields that meet your custom criteria using Jackson 2.
Jackson Ignore Properties on Marshalling
Control your JSON Output – Ignore certain fields directly, by name or by type (with mixins) for Jackson bliss.
Partition a List in Java
Filed under Java List
How to Partition a List using Guava or Apache Commons Collections.
A Guide to JPA with Spring
Setup JPA with Spring – how to set up the EntityManager factory and use the raw JPA APIs.
Creating a Web Application with Spring
How to Bootstrap a Web Application with Spring and Java-based Configuration.
Apache HttpClient Cookbook
Filed under HTTP Client-Side
HttpClient 4 examples and best practices.
Mockito When/Then Cookbook
Filed under Testing
Mockito configure Behavior – examples, usage and best practices.