Learn about the different features OkHttp has for POST requests.
Also find me here:
Baeldung Editor
Zeger Hendrikse
I am a self employed IT consultant who is specialized in fields of Java/JEE development, agile coaching and continuous delivery. The majority of my projects have been related to finance and insurance. My favorite slogan is: keep it simple!
Here's what I've reviewed (so far):
Baeldung on Java
- All
- Java (12)
- Spring (9)
- Persistence (8)
- Java Collections (6)
- Guava (6)
- Core Java (6)
- Data (5)
- Testing (4)
- Spring Boot (4)
- Java String (4)
- HTTP Client-Side (4)
- REST (3)
- Java Streams (3)
- Jakarta EE (3)
- XML (2)
- Spring Security (2)
- Spring MVC (2)
- NoSQL (2)
- Java Map (2)
- Java IO (2)
- Java Concurrency (2)
- Java Array (2)
- Groovy (2)
- Spring Web (1)
- Spring Cloud (1)
- Security (1)
- Networking (1)
- Java Web (1)
- Java Dates (1)
- JVM (1)
- JSON (1)
- IDE (1)
- Cloud (1)
- Artificial Intelligence (1)
- Architecture (1)
A Quick Guide to Timeouts in OkHttp
Filed under HTTP Client-Side, Testing
Learn what different ways to configure timeouts when testing endpoints using OkHttp
Polymorphism in Java
Filed under Core Java
Discover polymorphism in Java.
The Order of Tests in JUnit
Filed under Testing
Learn how to run JUnit tests in a custom order.
CAS SSO With Spring Security
Filed under Spring Security
Learn how to integrate the Central Authentication Service (CAS) with Spring Security.
Introduction to Spring Cloud CLI
Filed under Spring Cloud
Learn about Spring Boot Cloud CLI which provides a set of command line enhancements to the Spring Boot CLI.
The Java continue and break Keywords
Filed under Core Java
Learn about the continue and break Java keywords and how to use them in practice.
Groovy Bean Definitions
Learn how we can use a Groovy-based configuration in our Java Spring projects.
HibernateException: No Hibernate Session Bound to Thread in Hibernate 3
Filed under Persistence, Spring
Discover when “No Hibernate Session Bound to Thread” exception gets thrown and how to deal with it.
Intro to JDO Queries
Filed under Persistence
Learn about different query languages that JDO supports.
Commits and NRT Search in SolrCloud
Filed under Cloud
Discover NRT search in the new SolrCloud.
Introduction to EthereumJ
Filed under Java
Learn about the EthereumJ library that allows us to interact with the Ethereum blockchain, using Java.
Using Pairs in Java
Filed under Java
Learn how to achieve Pair functionality in Java.
Spring’s RequestBody and ResponseBody Annotations
Filed under REST, Spring MVC
Learn about the Spring @RequestBody and @ResponseBody annotations.
Test a Linked List for Cyclicity
Filed under Java Collections
Learn about a couple of ways of detecting and removing cycles in a linked list.
Guide to Collections API in Vavr
Filed under Java Collections
Discover Vavr’s powerful persistent collections API.
Delete a Directory Recursively in Java
Filed under Java IO
Learn how to delete a directory recursively in plain Java, and by using external tools.
Introduction to Vavr’s Validation API
Learn about Vavr’s validation API and how to use its most relevant methods.
Hibernate Many to Many Annotation Tutorial
Filed under Persistence
Learn how the @ManyToMany annotation can be used for specifying many-to-many relationships in Hibernate.
Introduction to EJB JNDI Lookup on WildFly Application Server
Filed under Jakarta EE
Learn how to implement a basic EJB module on WildFly and call an EJB from a remote client via JNDI.
CharSequence vs. String in Java
Filed under Java String
Learn the differences between CharSequence and String.
Introduction to Apache Shiro
Filed under Security
Discover Apache Shiro, a versatile Java security framework.
Broadcasting and Multicasting in Java
Filed under Networking
Learn how one-to-all (broadcast) and one-to-many (multicast) communications can be handled in Java.
Securing Jakarta EE with Spring Security
Filed under Jakarta EE, Spring Security
Learn how to secure a Jakarta EE web application with Spring Security.
Guide to hashCode() in Java
Filed under Core Java
Learn how hashCode() works and how to implement it correctly.
Introduction to Neuroph
Filed under Artificial Intelligence
Learn about Neuroph, an open-source library for creating neural networks and utilizing machine learning.
Introduction to PCollections
Filed under Java Collections
Learn about PCollections, a Java library providing persistent, immutable collections.
Apache Camel with Spring Boot
Filed under Spring Boot
Learn about Apache Camel with Spring Boot.
A Guide to Byte Buddy
Filed under Java
A quick and practical example of using ByteBuddy – a tool for runtime class creation.
Microbenchmarking with Java
Filed under Java
Learn about JMH, the Java Microbenchmark Harness.
An Introduction to Atomic Variables in Java
Filed under Java Concurrency
Learn how to use atomic variables for solving concurrency issues.
Apache Commons Collections BidiMap
Filed under Java Map
Learn about the BidiMap from the Apache Commons Collections library.
Apache Commons Collections SetUtils
Filed under Java Collections
Learn to use the SetUtils API of Apache Commons Collections library.
Exceptions in Lambda Expression Using Vavr
Filed under Java
Learn about various ways to overcome handling of checked exceptions using the functional Java library Vavr.
Iterate Over a Map in Java
Filed under Java Map
Learn different ways of iterating through the entries of a Map in Java.
How to Warm Up the JVM
Filed under JVM
Learn what it means to warm up a JVM and how to do it.
How to Get a Name of a Method Being Executed?
Filed under Core Java
Learn to how to find out the name of a method being executed.
Introduction to Quartz
Filed under Data
Learn how to schedule jobs with the Quartz API.
Converting String to Stream of chars
Filed under Java String
Learn how to convert a String to a Stream of single characters.
Merging Streams in Java
Filed under Java Streams
Learn the different ways of merging Java Streams.
Intro to Structurizr
Filed under Architecture
Learn Structurizr, a diagram editor that renders architectural artifacts using Java.
The Difference Between map() and flatMap()
Filed under Java Streams
Learn about the differences between map() and flatMap() by analyzing some examples of Streams and Optionals.
Introduction to HikariCP
Filed under Persistence
We learn about the HikariCP JDBC connection pool project.
Introduction to Java Serialization
Filed under Core Java
We learn how to serialize and deserialize objects in Java.
Java Double Brace Initialization
Filed under Core Java
Learn how double braces can be used for creating and initializing objects and for representing these operations in a single expression.
Count Occurrences of a Char in a String
Filed under Java String
Learn how to count characters with the core Java library and with libraries and frameworks such as Spring and Guava.
Guide to Guava ClassToInstanceMap
Filed under Guava
Learn how to use the Google Guava’s ClassToInstanceMap interface and its implementations.
How to Copy an Array in Java
Filed under Java Array
Learn how to copy an array in Java, with examples of various methods.
Dynamic Proxies in Java
Filed under Java
Learn how to use Java’s dynamic proxies – one of the primary proxy mechanisms available in the language.
Difference Between Wait and Sleep in Java
Filed under Java Concurrency
A quick and practical example of the difference between sleep() and wait() methods in Java.
Introduction to Groovy Language
Filed under Groovy
A look some of the essential features of Groovy, including basic syntax, control structures, and collections.
Using @JsonComponent in Spring Boot
Filed under JSON, Spring Boot
Learn how to use the @JsonComponent annotation in Spring Boot.
Flattening Nested Collections in Java
Filed under Java Collections
Learn quickly how to flatten a nested collection in Java.
A Guide to the Spring State Machine Project
Filed under Spring
Learn how to use Spring’s State Machine project, to represent workflows or any other kind of finite state machines for your system.
Exploring the Spring Boot TestRestTemplate
Filed under HTTP Client-Side, Spring Boot, Spring Web, Testing
Learn how to use the new TestRestTemplate in Spring Boot to test a simple API.
A Guide to the Java Web Start
Filed under Java Web
This article explains what Java Web Start (JWS) is, how to configure it on the server side, and how to create a simple application.
Spring Boot Authentication Auditing Support
Filed under Spring Boot
Explore the Spring Boot Actuator module and the support for publishing Authentication and Authorization events in conjunction with Spring Security.
A Guide to the Java API for WebSocket
Filed under Java IO
WebSocket provides an alternative to the limitation of efficient communication between the server and the web browser by providing bi-directional, full-duplex, real-time client/server communications.
Spring LDAP Overview
Filed under Spring
Learn how to use the Spring LDAP APIs to authenticate and search for users, as well as to create and modify users in the directory server.
String Processing with Apache Commons Lang 3
Filed under Data, Java String
Quick intro to working with Strings with the Apache Commons library and StringUtils.
Array Processing with Apache Commons Lang 3
Filed under Java Array
Quick intro to working with arrays with the Apache Commons library and ArrayUtils.
Java 9 – Exploring the REPL
Filed under Java
Quick intro to jshell, the interactive REPL (Read-Evaluate-Print-Loop) console bundled with JDK 9.
A Guide to Neo4J with Java
Filed under Persistence
This article is about Neo4j – one of the most mature and full-featured graph databases on the market today.
Guide to Guava’s PreConditions
Filed under Guava
In this tutorial, we’ll show how to use the Google Guava’s Preconditions class.
Guide to Guava Table
Filed under Guava, Java Collections
In this tutorial, we’ll show how to use the Google Guava’s Table interface and its multiple implementations.
CORS with Spring
Filed under Spring
Simple config for CORS with the built-in support in Spring MVC.
Guide to Guava RangeMap
Filed under Guava
Learn how to use the Google Guava’s RangeMap interface and its implementations.
Guide to Guava RangeSet
Learn how to use the Google Guava RangeSet and its implementations through practical examples.
Guide to the Guava BiMap
Filed under Guava
In this tutorial, we’ll show how to use the Google Guava’s BiMap interface and its multiple implementations.
Guide to Spring Email
Filed under Spring
In this article, we’ll walk through the steps needed to send emails from both a plain vanilla Spring application as well as from a Spring Boot application.
Introduction to Nashorn
Filed under Java
A quick, practical intro to Nashorn, the default JavaScript engine for the JVM as of Java 8.
Guide to JAXB
Filed under XML
This is an introductory article on JAXB (Java Architecture for XML Binding).
Microsoft Word Processing in Java with Apache POI
Filed under Data
Learn how to make use of Apache POI to work with Word documents in Java.
Intro to AspectJ
Filed under Java
This article is a quick and practical introduction to AspectJ.
Deleting Objects with Hibernate
Filed under Persistence
Quick guide to deleting an entity in Hibernate.
A Guide to OkHttp
Filed under HTTP Client-Side
The basics of using OkHttp – exploring sending different types of HTTP requests, receiving and interpreting HTTP responses, and how to configure a Client.
Guide to Selenium with JUnit / TestNG
Filed under Testing
A quick guide to writing tests with Selenium in Java.
Introduction to Apache CXF Aegis Data Binding
Filed under XML
An introduction to Aegis data binding, a subsystem that can map between Java objects and XML documents described by XML schemas.
Apache CXF Support for RESTful Web Services
Filed under REST
We introduce Apache CXF as a framework compliant with the JAX-RS standard, which defines support of the Java ecosystem for the REST architectural pattern.
A Guide to Cassandra with Java
Filed under NoSQL
This tutorial is an introductory guide to the Apache Cassandra database using Java.
Get the Current Date and Time in Java
Filed under Java Dates
This article describes how we may get the current date, current time and current time stamp in Java.
Database Migrations with Flyway
Filed under Persistence
This article describes key concepts of Flyway and how we can use this framework to continuously remodel our application’s database schema reliably and easily.
Hibernate Second-Level Cache
Filed under Persistence
A guide to the Hibernate second-level cache and how to use it in practice.
A Guide to Apache CXF with Spring
Filed under Spring
Quick tutorial on how to use Apache CXF with the Spring Framework and how to configure it either using Java or XML.
Intro to Jedis – the Java Redis Client Library
Filed under NoSQL
An introduction to Jedis, a client library in Java for Redis – the popular in-memory data structure store that can persist on disk as well.
A Guide to Spring in Eclipse STS
A quick guide to working with Spring using the Eclipse Spring Tool Suite (STS) IDE.
Binary Data Formats in a Spring REST API
In this article we explore how to configure Spring REST mechanism to utilize binary data formats which we illustrate with Kryo. Moreover we show how to support multiple data formats with Google Protocol buffers.
Introduction to Apache CXF
Filed under Jakarta EE
This tutorial is the first of a series on Apache CXF, introducing basic characteristics of the framework.
The Java 8 Stream API Tutorial
Filed under Java Streams
The article is an example-heavy introduction of the possibilities and operations offered by the Java 8 Stream API.
Http Message Converters with the Spring Framework
Filed under Spring MVC
How to configure HttpMessageConverters for a REST API with Spring, and how to use these converters with the RestTemplate.