Retrofit basics – GET

Reading Time: 6 minutes

In this chapter we gonna continue the Retrofit basics tutorial with the simple GET request to let the user login in our sample application into an example WordPress website. Thenafter, also using the GET request, we gonna fetch the list of the users.

Basically the login won’t be a usual login process, because we will use only the username to let the user login. Because the username field is always unique in WordPress, we can clearly identify the user.

Read moreRetrofit basics – GET

Follow and like us:

Retrofit basics – POST

Reading Time: 8 minutes

We are going to continue the Retrofit basics tutorial with the HTTP POST request together with the WordPress REST API, which allows us to send data to the server and register the user.

First in this chapter, we will create an interface for the Json API and there we will define the relative URL endpoint for the POST request and the needed arguments.

Then, we are going to create a singleton client for Retrofit. This client will hold the needed information for the authetication. Thenafter come the base url, the HTTP client and an instance about the JSON API.

So, let’s start coding. 😎

Read moreRetrofit basics – POST

Follow and like us:

Retrofit basics – Preparation

Reading Time: 11 minutes

We are going to start the Retrofit basics tutorial with the preparation of the sample application. In every case, when you start a new project, you have to make shorter or longer preparations before you can start implementing the business logic.

In this chapter first, we will start a new project in Android Studio, then we will add the needed dependencies. Thenafter, we will create the four fragments, the toolbar and the navigation graph, and some more smaller things 😊. The last thing will be a base class for our app.

Read moreRetrofit basics – Preparation

Follow and like us:

Retrofit basics – Introduction

Reading Time: 3 minutes

In the introduction part of the Retrofit basics tutorial we are going to summarize the following chapters and give you an overview what you will learn, if you do this tutorial.

In this tutorial we are going to show you how you can send (register user), post (fetch all users) and get your profile from the database of a WordPress website, what we have prepared already for you.

For all of this, we are going to use the Retrofit library, which is a type-safe HTTP client for Android. To get the data from the website, we will use a WordPress REST API, called Swagger.

Read moreRetrofit basics – Introduction

Follow and like us:

stay informed!

Subscribe to receive exclusive content and notifications