示例#1
0
 /// <summary>
 /// POST request
 /// </summary>
 /// <param name="settings">HTTP settings</param>
 /// <param name="body">Body of post request</param>
 /// <typeparam name="T">Type of the body</typeparam>
 /// <returns>The request was success or not</returns>
 public async Task <bool> Create <T>(HttpSettings settings, HttpBody <T> body)
 {
     return((await SendRequest <object>(settings, HttpMethod.Post, body.GetStringContent())).IsSuccess);
 }
示例#2
0
 public async Task <T> CreateWithResult <T, TBody>(HttpSettings settings, HttpBody <TBody> body)
 {
     return((await SendRequest <T>(settings, HttpMethod.Post, body.GetStringContent(), true)).Content);
 }