I am attempting to perform Post
requests to a server in my Xamarin forms app, however we recently updated our security policies and are no longer using TLS 1.0 This change appears to have broken the post request and now it times out.
To test this we re-enabled TLS 1.0 just for this service, and I can confirm it does now work. We of course would prefer to force better ciphers, is there any adjustments that can be made to the following request that could ensure it works once we return to the previous policy.
public static async Task<LoginResponse> LoginRESTSend(FormUrlEncodedContent payload)
{
var cl = new HttpClient();
cl.Timeout = TimeSpan.FromSeconds(10);
HttpResponseMessage request = await cl.PostAsync((RESTURL + "/login"), payload);
request.EnsureSuccessStatusCode();
var response = await request.Content.ReadAsStringAsync();
LoginResponse res = JsonConvert.DeserializeObject<LoginResponse>(response);
return res;
}
Edit
I don't believe this is a duplicate of this as the issue is not about sending over https (which I believe it is actually already doing) but more about the TLS version it's using.