Pular para o conteúdo

Exemplos

Abaixo temos alguns exemplos de implementação da integração com AnnA Web Services

[HttpPost]
public HttpResponseMessage V3([FromBody] dynamic json) // Do not use dynamic type, this is for example purposes only
{
var containers = new List<object>
{
new
{
Type = "MESSAGE",
Phrase = json.value,
},
};
var response = new HttpResponseMessage(HttpStatusCode.OK);
response.Headers.Add("Authorization", Request.Headers.Authorization.ToString());
var responseContent = new
{
success = true,
message = "",
containers
};
response.Content = new StringContent(JsonConvert.SerializeObject(responseContent), Encoding.UTF8, "text/plain");
return response;
}