Xamarin Android Tutorial - Send Post Request to Rest API with Refit

preview_player
Показать описание

In this tutorial , i will show you how to use Refit library to send post request to API , get JSON return and convert it to item

xamarin android tutorial,
xamarin tutorial,
xamarin tutorial android,
xamarin studio tutorial,
xamarin studio android tutorial,
xamarin visual studio tutorial,
xamarin c# tutorial,
android xamarin tutorial,
c# android tutorial,
learn xamarin,
c# xamarin tutorial,
xamarin c# android tutorial,
xamarin android,
xamarin cross platform tutorial,
tutorial android,
tutorial xamarin android xamarin android, android xamarin
Рекомендации по теме
Комментарии
Автор

Hello sir, I want to get your idea about a problem that i faced in the project that I am developing :) If you help me I'll be very glad.

In my application, I have 2 thread and one of them downloads a file which has lots of information about some events from an endpoint and stores it in the application.

Another thread is parsing this file and shows its content in the main activity in the list to the users.

The problem is, whenever the 1st threads running and downloading If the file exists in the application then it overwrites to this file but whenever the 2nd threads running the application is crashing because while 1st thread trying to write to this file, 2nd one tries to read it.

So, how can I lock the file while the 1st thread is trying to write it, and allow to the 2nd thread to read it if the file is not locked by other thread?

Thank you very much

denemedeneme
Автор

Hello, can you give an example of retrieving API data on the website directly. For example, in the webview menu, can I have combobox or text and load api data into it? thank you very much.

JANHOME
Автор

sir i want to get a list from database with Rest Api but i must send more then two parameters, ex.) i have a student table and i ll get a student list as only gender=male and age=15.. so i need to send an object and then i ll get a list and bind them.. how can i do that.. or anybody have any suggestion ?

mehmetkuzu
Автор

please sir make the video on java tutorial i want to learn java completely i know no anyone can complete the java

HamidShaikh-hwum
Автор

hey man i need your two projects one is food order app and other is uber clone app i am working on my final year project and i want to merge these two projects i can pay you 5 dollars if you are wiling to do so kindly reply thanks

rabailtv
Автор

Thanks for the Great tutorial, while I have a question of applying Bearer Authorization

Bearer Authorization to refit



How to apply Bearer authorization in Refit request.

public class VerifyUserVM
{
public long BeneficiarId { get; set; }
public string NationalId { get; set; }
public Nullable<int> LKCountryId { get; set; }
public Nullable<int> ServiceCountryID { get; set; }
public string PhoneNumber { get; set; }
public string FullName { get; set; }

public string FirstName { get; set; }
public string FatherName { get; set; }
public string FamilyName { get; set; }


public string CountryKey { get; set; }
public string ServiceCountry { get; set; }
}

This is My Post Content

public class PostContent
{
public VerifyUserVM model { get; set; }
public List<object> Errors { get; set; }
public int SmsCounter { get; set; }
public string VerCode { get; set; }

public PostContent()
{
model = new VerifyUserVM();
Errors = new List<object>();


}

}



In my activity:


public interface IMyAPI
{
[Post("/VerifyIndividual")]
// Task<PostContent> string authorization, [Body] PostContent post);

[Headers("Authorization: Bearer")]
Task<PostContent> SubmitPost([Body] PostContent post);
}






PostContent result = await myAPI.SubmitPost(post, token);-

hanyel-ghaish
welcome to shbcf.ru