Copy of RestTemplate Post Request with JSON 1. Introduction In this tutorial, we’ll illustrate how to use Spring’s RestTemplate to make POST requests sending JSON content. 2. Setting Up the Example Let’s start by adding a simple Person model class to represent the data to be posted: public class Person… Continue Reading spring-resttemplate-post-json-test

“Stream has already been operated upon or closed” Exception in Java 1. Overview In this brief article, we’re going to discuss a common Exception that we may encounter when working with the Stream class in Java 8: IllegalStateException: stream has already been operated upon or closed. We’ll discover the scenarios… Continue Reading java-stream-operated-upon-or-closed-exception

RxJava and Error Handling 1. Introduction In this article, we’ll take a look at how to handle exceptions and errors using RxJava. First, keep in mind that the Observable typically does not throw exceptions. Instead, by default, Observable invokes its Observer’s onError() method, notifying the observer that an unrecoverable error… Continue Reading rxjava-error-handling