test .
This commit is contained in:
@@ -49,12 +49,15 @@ public class GainfoFacesController : ControllerBase
|
||||
var secret = "MLl7Dv7p5Pgc9XYI3r4O";
|
||||
|
||||
var headers = InitRequest(url, body, key, secret);
|
||||
foreach (var item in headers.Where(x => x.Key != "Content-Type"))
|
||||
|
||||
|
||||
var content = new StringContent(body, Encoding.UTF8);
|
||||
foreach (var item in headers)
|
||||
{
|
||||
client.DefaultRequestHeaders.Add(item.Key, item.Value);
|
||||
content.Headers.Add(item.Key, item.Value);
|
||||
}
|
||||
|
||||
var r = await client.PostAsync(url, new StringContent(body, Encoding.UTF8, "application/json"));
|
||||
var r = await client.PostAsync(url, content);
|
||||
return await r.Content.ReadAsStringAsync();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user