Skip to content

Commit

Permalink
Merge pull request #321 from apodlaski/master
Browse files Browse the repository at this point in the history
Another fix for ExecuteAsync
  • Loading branch information
ayoung committed Sep 13, 2012
2 parents 196fa7e + 2ce5204 commit eef0c86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RestSharp/RestClient.Async.cs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public virtual RestRequestAsyncHandle ExecuteAsync(IRestRequest request, Action<
/// <param name="httpMethod">The HTTP method to execute</param> /// <param name="httpMethod">The HTTP method to execute</param>
public virtual RestRequestAsyncHandle ExecuteAsyncGet(IRestRequest request, Action<IRestResponse, RestRequestAsyncHandle> callback, string httpMethod) public virtual RestRequestAsyncHandle ExecuteAsyncGet(IRestRequest request, Action<IRestResponse, RestRequestAsyncHandle> callback, string httpMethod)
{ {
return ExecuteAsync(request, callback, httpMethod, DoAsPostAsync); return ExecuteAsync(request, callback, httpMethod, DoAsGetAsync);
} }


/// <summary> /// <summary>
Expand All @@ -65,7 +65,7 @@ public virtual RestRequestAsyncHandle ExecuteAsyncGet(IRestRequest request, Acti
public virtual RestRequestAsyncHandle ExecuteAsyncPost(IRestRequest request, Action<IRestResponse, RestRequestAsyncHandle> callback, string httpMethod) public virtual RestRequestAsyncHandle ExecuteAsyncPost(IRestRequest request, Action<IRestResponse, RestRequestAsyncHandle> callback, string httpMethod)
{ {
request.Method = Method.POST; // Required by RestClient.BuildUri... request.Method = Method.POST; // Required by RestClient.BuildUri...
return ExecuteAsync(request, callback, httpMethod, DoAsGetAsync); return ExecuteAsync(request, callback, httpMethod, DoAsPostAsync);
} }


private RestRequestAsyncHandle ExecuteAsync(IRestRequest request, Action<IRestResponse, RestRequestAsyncHandle> callback, string httpMethod, Func<IHttp, Action<HttpResponse>, string, HttpWebRequest> getWebRequest) private RestRequestAsyncHandle ExecuteAsync(IRestRequest request, Action<IRestResponse, RestRequestAsyncHandle> callback, string httpMethod, Func<IHttp, Action<HttpResponse>, string, HttpWebRequest> getWebRequest)
Expand Down

0 comments on commit eef0c86

Please sign in to comment.