如何使用RestSharp向Windows Phone 7发出POST请求?

时间:2011-11-27 06:32:19

标签: c# windows-phone-7 httpwebrequest http-post restsharp

如何发送数据以验证服务器?使用当前代码:

 var client = new RestClient("http://myserver.com");

        var request = new RestRequest("login", Method.POST);
        request.AddParameter("email", "myemail", ParameterType.GetOrPost);
        request.AddParameter("pass", "mypassword", ParameterType.GetOrPost);
        request.AddParameter("token", "mytoken", ParameterType.GetOrPost);

        client.ExecuteAsync(request, (response) =>
        {
            var auth = response.Content.ToString();
        });

在此代码之后,如果程序嗅探器(HttpAnalyzer)查看Headers和Response Content,将在响应内容中写入:Request is not completed. waiting ...,响应标头将为空...如何发布帖子RestSharp?

0 个答案:

没有答案