Articles tagged with

04 Jun 2024

REST service client: design, testing, monitoring

The purpose of this article is to present how to design, test, and monitor a REST service client. The article includes a repository with clients written in Kotlin using various technologies such as WebClient, RestClient, Ktor Client, Retrofit. It demonstrates how to send and retrieve data from an external service, add a cache layer, and parse the received response into domain objects.

28 Apr 2016

Meet Retrofit2

In this post I will introduce to you a recently released version of a well known library for consuming RESTful services — Retrofit2. Even though it is mainly targeted at Android platform it works very well on the “server” Java. Its lightness and low garbage generation overhead make it an interesting option if one does not like existing solutions (like Jersey Client, or Spring’s RestTemplate). I will also show how to configure it properly and fully utilize its great RxJava compatibility.

13 May 2015

How to write JAX-RS Client fast

According to best practices, when developing a service, one should provide a client for it. If your service API undergoes changes quite often, constant client updates may become troublesome. In this article, I will show you how to develop (quickly and effortlessly!) a JAX-RS client that handles all API changes smoothly.

29 Jan 2015

Content headers or how to version your API?

When you publish your service API it is crucial to make it easy to upgrade. If you forget about it, you might end up in dependency hell. Each attempt to change your API will force you to contact all your clients and tell them to upgrade their software. As a result, both you and your clients will be very unhappy. You can mitigate it by providing multiple versions of your resources. But there is no single way how to manage them. Different companies solve it in different ways. Below you find three most popular approaches.

19 Dec 2014

Designing RESTful API

In distributed environments it is crucial to have a common, standardized language which services can use to exchange information between each other. At Allegro, to meet this goal, we’ve chosen the REST architecture.

26 Nov 2014

Testing RESTful services and their clients

REST (Representational State Transfer) has become very popular over the course of the past few years. It has happened so not only because of growing popularity of lightweight Web frameworks (like Angular.js) but also due to the new Microservice Architecture hype (thank you Netlifx). Frameworks like Spring add new REST-related functionalities with each new release and more and more companies decide to give them a try… But how do you test them - REST services and their clients?