Get the status code of an HTTP Response with HttpClient 4.
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):
Create an immutable List from an ArrayList with the JDK, Guava or Apache Commons Collections.
How to parse a JSON String into the Jackson JsonNode Model.
Ignore null fields with Jackson 2 – either globally, per class or even per field.
How to map a JSON Array correctly in a type-safe manner to a Java Collection.
Stop/Abort long running requests with the Apache HttpClient 4.x.
Set a custom User-Agent header on the client (or on individual requests) with the Apache HttpClient 4.
Jackson – Change the name of a field to adhere to a specific JSON format.
Only serialize fields that meet your custom criteria using Jackson 2.
Control your JSON Output – Ignore certain fields directly, by name or by type (with mixins) for Jackson bliss.
How to Partition a List using Guava or Apache Commons Collections.
Setup JPA with Spring – how to set up the EntityManager factory and use the raw JPA APIs.
How to Bootstrap a Web Application with Spring 4 and Java based Configuration.
HttpClient 4 examples and best practices.
Mockito configure Behavior – examples, usage and best practices.
Mockito Verify examples, usage and best practices.
Guava Predicate and Function examples and usage best practices.
Common Hamcrest matchers helpful when working with Collections and arrays.
Exception Handling for a REST API – illustrate the new Spring 3.2 recommended approach as well as earlier solutions .
Guava Ordering Cookbook illustrating code examples and nothing else.