Invalid RestSharp URI: Incorrect URI Scheme

I'm trying to get my head wrapped around restsharp for Windows Phone 7. I try to use the POST method to send some data to the server, but when it gets to the client.executeasync line, it crashes with the error "Invalid URI: URI scheme is invalid." 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;
        });
+5
source share
1 answer

Change the first line to

var client = new RestSharp.RestClient("http://10.0.1.20:8085");
+4
source

All Articles