Created
November 27, 2014 08:14
-
-
Save Imater/3a0e80eccba18c564251 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public List<TModel> Post<TModel>(string url, object bodyObject) where TModel : new() | |
{ | |
var request = new RestRequest(url, Method.POST) | |
{ | |
RequestFormat = DataFormat.Json | |
}; | |
request.AddBody(bodyObject); | |
IRestResponse<List<TModel>> response = _client.Execute<List<TModel>>(request); | |
CheckResponseFailed(response); | |
return response.Data; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment