0
I’m trying to register (POST) this endpoint https://geradornf-prod.herokuapp.com/ (is a Simple API I made with Django Rest)
I’m using Windows Forms C#
Follow the call:
using (var client = new HttpClient())
{
client.BaseAddress = new Uri(UtilDAO.UrlApi());
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage response = await client.PostAsJsonAsync("/emitente", emitente);
return response;
}
And you’re giving me back 500
{StatusCode: 500, ReasonPhrase: 'Internal Server Error', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Connection: keep-alive
Transfer-Encoding: chunked
X-Frame-Options: SAMEORIGIN
Date: Tue, 02 Aug 2016 23:05:36 GMT
Server: gunicorn/19.6.0
Via: 1.1 vegur
Content-Type: text/html
}}
Someone would know what it could be?
o GET Works!
In case you wanted to see the API see in : https://github.com/leonardocintra/GeradorNf-e-API