In this tutorial, you’ll learn how to use the @PutMapping annotation in your RESTful web services app to handle HTTP PUT requests with a JSON or XML payload. This allows you to update user details, for example. Here’s an example CURL command to send an HTTP PUT request with JSON data containing user details: HTTP…Read More @PutMapping in Spring Boot 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 blog post, I will share how to copy properties from a DTO object to an Entity object and then back from an Entity object to a DTO object. DTO stands for Data Transfer Object, and it is a simple, Plain Old Java Object that typically contains class properties and getter and setter methods…Read More DTO to Entity Conversion in Java
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
If your mobile or web app allows the user to register and have an account with your project then you also need to let users recover their lost or forgotten password. And in this video tutorial, I am going to share with you a few videos that will help you implement Password Reset functionality in your…Read More Password Reset in REST API. Video tutorial.
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
This REST Assured tutorial will teach you how to make an HTTP POST request and validate the Response. To break it into more detail, you will learn: Make HTTP Post requests with REST Assured, Create JSON Object using the com.google.gson library, Send JSON payload in the body of HTTP Post request, Validate the Response Read the…Read More REST Assured HTTP Post Request
In this tutorial, you will learn how to retrieve the HTTP header value from an HTTP response while testing your RESTful API using REST Assured. What are HTTP Headers? HTTP headers are a fundamental part of the HTTP protocol, which is the protocol used to transfer data over the web. An HTTP header is a…Read More Read HTTP Header with REST Assured
In this short tutorial on REST Assured you will learn how to get the entire HTTP Response Body when testing your RESTful Web Service Endpoint. Web Service Endpoint Response Let’s assume we have the following Web Service Endpoint URL and when HTTP GET request is made to this Web Service Endpoint a JSON representation of…Read More REST Assured Get HTTP Response Body
In this REST Assured tutorial, you will learn how easy it is to test and validate RESTful APIs. REST Assured provides excellent HTTP support, explicit verbs, and actions. We will use REST Assured in this tutorial and the Hamcrest library to perform assertions. REST Assured Maven Dependencies Before laying down examples for this library, we need…Read More REST Assured Tutorial
This tutorial will teach you 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 are…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.
Earlier I have shared a series of video tutorials on how to create user Login and Registration pages for your mobile application that communicates with a server side php scripts…
The post User Registration, Sign in And Token Based Authentication appeared first on Swift Developer Blog.Read More User Registration, Sign in And Token Based Authentication