I am creating a xamarin mobile application and I want to create new users from the mobile application , I know I can create users from sync gateway configuration or from admin REST API , I tried to use the admin REST API in the application but I got Java.Net.SocketTimeoutException
so how can I use the admin REST API to create users in the application ?
Here in the code I am using :
private async void CreateUserBtnClicked(object sender, EventArgs e)
{
HttpClient _client = new HttpClient(); //Creating a new instance of HttpClient. (Microsoft.Net.Http)
content = "{\"Username\":\"user.com\",\"Password\":\"123456\"}";
string url = "http://<server_ip>:4985/user/";
var request = await _client.PostAsync(url, new StringContent(content, Encoding.UTF8, "application/json"));
}