I am trying to get my head wrapped around restsharp for windows phone 7. I am trying to use the POST method to feed some data to a server, but when it gets to the client.executeasync line, it crashes with the error "Invalid URI: The URI Scheme is not valid." What am I missing?
var client = new RestSharp.RestClient("10.0.1.20:8085");
var request = new RestSharp.RestRequest("/test", RestSharp.Method.POST);
request.AddParameter("param1", "value1", RestSharp.ParameterType.GetOrPost);
request.AddParameter("param2", "value2", RestSharp.ParameterType.GetOrPost);
request.AddParameter("param3", "value3", RestSharp.ParameterType.GetOrPost);
request.AddParameter("param4", "value4", RestSharp.ParameterType.GetOrPost);
client.ExecuteAsync(request, (response) =>
{
var auth = response.Content;
});
Change the first line to
var client = new RestSharp.RestClient("http://10.0.1.20:8085");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With