REST

In this REST Assured tutorial, I will demonstrate how to evaluate the JSON content that is returned in the response body of an HTTP response. What is REST Assured? REST Assured is a Java-based library for testing RESTful web services. It provides a domain-specific language (DSL) for writing tests that interact with web services using…

Read More Validate JSON Response with REST Assured

This short REST Assured tutorial will teach you how to validate the HTTP Response Status Code while testing a RESTful Web Service endpoint. Each HTTP Response includes a status code, and by examining the status code value, we can determine if the HTTP Response was successful or not. Let’s explore how we can use REST…

Read More Validate HTTP Status Code: RestAssured

In this tutorial, you will learn how to read HTTP Request Header in the Rest Controller class of your Spring Boot application. To read HTTP Request Header in Spring Boot REST application, we use @RequestHeader annotation. @RequestHeader(value=”Accept”) String acceptHeader To learn how to test if HTTP Header is received, read the tutorial about Testing HTTP Header…

Read More Read HTTP Request Header in Spring Boot REST

In this short tutorial, I am going to share with you how to enable CrossOrigin in a RESTful Web Service API built with Spring Boot that also has Spring Security enabled. Enable CrossOrigin for Specific Endpoint  To enable cross-origin AJAX HTTP requests to a specific RESTful Web Service endpoint in our Rest Controller class we can use…

Read More CrossOrigin and CORS in RESTful Web Service

In this tutorial, you will learn how to implement pagination in your RESTful Web Services application built with Spring Boot. The code example below will demonstrate how to implement pagination for the API endpoint that returns a list of users. I assume you already have your Spring Boot RESTful Web Service built, but if you…

Read More Pagination Tutorial with Spring Boot REST

Adding dependency injection support into Jersey 2 Web Services application that uses HK2 is not very straightforward. So, I created this page to document things I needed to do in my Jersey 2 RESTful Web Services app to make the Dependency Injection work. Hope you will find it useful. Create a new class that extends AbstractBinder. This…

Read More Dependency Injection with HK2 in Jersey and JAX-RS

When you start building a mobile app most likely you will need to build pages like user Sign up and once user has successfully registered, you will need to create a Sign in page. I have created many video tutorial how to implement these pages in Swift and if you follow those you will no doubt…

Read More REST API with Java JAX-RS. Create and Deploy to Amazon Cloud.