Calling PUT and POST method in Retrofit

Save

What is  Retrofit Library and How to send PUT and POST method in the retrofit?

Retrofit Library is a REST Client for Android and Java by Square. It makes relatively easy to send and retrieve JSON (or other structured data)  via rest Webservice. In Retrofit, we can configure which converter is used for the data serialization.

When we want to send JSON request data then we use @body annotation in our Request call and pass our request model with @body in the request, and set the content type application/json in the header.

We can also use @Field Annotation, so, we must put @FormUrlEncoded in our API call.

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

css.php

Excellent work, fast, good quality and understood the brief perfectly! Quick responses developing the project and very good cooperation. I suggest to anyone.

Stathis Plakidas

Stathis Plakidas

Talk to Sales

Global

Live Chat
Start a Project


    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home