Playback starts YouTube’s embedded player (privacy-enhanced mode).
Retrofit Tutorial Part 3 - POST REQUEST & FORM URLENCODED - Android Studio Tutorial
ChannelCoding in FlowDescription from the creator
In part 3 of the Retrofit tutorial, we will learn how to make HTTP POST requests on a REST API to create new resources.
For this we use the @POST annotation in our interface, define the relative URL endpoint and pass the object that we want to send to the server as an argument that we annotate with @Body. The GSON converter will then serialize this object into the JSON format before it is uploaded to the server. If we want to serialize the object into another format (like XML or String), we can use a different ConverterFactory.
The same as in a GET request, the POST method returns a Call object that we can enqueue to execute it asynchronously. A successful POST request will return a 201 (Created) response code together with a response body in the onResponse callback.
Retrofit also supports form-urlencoded format (application/x-www-form-urlencoded). For this we have to annotate a POST method with @FormUrlEncoded and pass either single @Field arguments or a @FieldMap.
Watch the whole playlist:
youtube.com/playlist?list=PLrnPJCHvNZuCbuD3xpfK…
Example code for this part:
gist.github.com/codinginflow/88a7fffd9caeb7a192…
____________________
💻 Find the BEST programming tutorials on TutHub:
tuthub.io
⭐ Get my MVVM Caching Course now:
codinginflow.com/caching
❗ Subscribe to the channel:
youtube.com/c/codinginflo...
📨 Subscribe to the Coding in Flow newsletter:
codinginflow.com/newsletter
❓ Join our free developer community:
discord.gg/TSnMvmc
📣 Follow Coding in Flow on other sites:
Facebook: facebook.com/codinginflow
Instagram: instagram.com/codinginflow
TikTok: tiktok.com/@codinginflow
Twitter: twitter.com/codinginflow
Github: github.com/codinginflow
💰 Business requests, sponsoring, etc.: [email protected]
For this we use the @POST annotation in our interface, define the relative URL endpoint and pass the object that we want to send to the server as an argument that we annotate with @Body. The GSON converter will then serialize this object into the JSON format before it is uploaded to the server. If we want to serialize the object into another format (like XML or String), we can use a different ConverterFactory.
The same as in a GET request, the POST method returns a Call object that we can enqueue to execute it asynchronously. A successful POST request will return a 201 (Created) response code together with a response body in the onResponse callback.
Retrofit also supports form-urlencoded format (application/x-www-form-urlencoded). For this we have to annotate a POST method with @FormUrlEncoded and pass either single @Field arguments or a @FieldMap.
Watch the whole playlist:
youtube.com/playlist?list=PLrnPJCHvNZuCbuD3xpfK…
Example code for this part:
gist.github.com/codinginflow/88a7fffd9caeb7a192…
____________________
💻 Find the BEST programming tutorials on TutHub:
tuthub.io
⭐ Get my MVVM Caching Course now:
codinginflow.com/caching
❗ Subscribe to the channel:
youtube.com/c/codinginflo...
📨 Subscribe to the Coding in Flow newsletter:
codinginflow.com/newsletter
❓ Join our free developer community:
discord.gg/TSnMvmc
📣 Follow Coding in Flow on other sites:
Facebook: facebook.com/codinginflow
Instagram: instagram.com/codinginflow
TikTok: tiktok.com/@codinginflow
Twitter: twitter.com/codinginflow
Github: github.com/codinginflow
💰 Business requests, sponsoring, etc.: [email protected]
About this tutorial
Coding in Flow published this 15:15 video tutorial on November 3, 2018. It has been watched 130,150 times on YouTube.
- Channel
- Coding in Flow
- Category
- Science & Technology
- Duration
- 15:15
- Published
- November 3, 2018
- Views
- 130,150
- Likes
- 1,739
Tags
Share
This tutorial in other languages
- FRRénovation Tutoriel Partie 3 - POST DEMANDE & FORMULAIRE urlencoded - Android studio Tutorial
- ESReequipamiento Tutorial Parte 3 - SOLICITUD DE POST & FORMA urlencoded - Android Studio Tutorial
- PTRetrofit Tutorial Parte 3 - PEDIDO POST & form-urlencoded - Android Estúdio Tutorial
- ITRetrofit Tutorial Parte 3 - Inserisci richiesta & FORM urlencoded - Android Studio Tutorial
- DERetrofit Tutorial Teil 3 - POST REQUEST FORM Urlencoded - Android Studio Tutorial
- NLRetrofit Tutorial Deel 3 - Aanvraag & FORM urlencoded - Android Studio Tutorial
- RUПереоборудование Учебник Часть 3 - POST REQUEST & FORM URLENCODED - Android-студия Tutorial
- PLModernizacja Tutorial Part 3 - KUPNO & FORM urlencoded - Android Studio Tutorial
- JAレトロフィットのチュートリアルパート3 - POSTリクエスト&FORM URLエンコード - のAndroid Studioチュートリアル
- ARالتحديثية دروس الجزء 3 - وظيفة طلب وشكل URLENCODED - الروبوت التعليمي ستوديو
- HIपुराना वापस ट्यूटोरियल भाग 3 - पोस्ट अनुरोध और फार्म urlencoded - एंड्रॉयड स्टूडियो ट्यूटोरियल
- IDRetrofit Tutorial Bagian 3 - POST REQUEST & FORMULIR urlencoded - Android Studio Tutorial