Last active
May 16, 2018 17:47
-
-
Save gmarcial/1b57df7577bd6234df90a7ec0740abbb 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
//EndPoint: /api/values | |
//Verbo Http: Post | |
//O header Content-Type deve ser application/json | |
//Servidor precisa receber assim. | |
{ "DataHora": "5/16/2018 5:04:20 PM", "Precipitacao": "15.5" } | |
//Você como desenvolvedor deve montar e enviar o payload assim. | |
//Onde esta {NomeAqui}, substitua pela variavel, sem as chaves, dentro dos parentes. | |
string payloadJson = "{ \"DataHora\": " + "\"" + DataHora + "\"" + ", \"Precipitacao\": " + "\"" + Precipitacao + "\" }"; | |
Ex: | |
//Variaveis | |
string DataHora = "5/16/2018 5:04:20 PM"; | |
string Precipitacao = "15.5"; | |
//Payload montado | |
string payloadJson = "{ \"DataHora\": " + "\"" + DataHora + "\"" + ", \"Precipitacao\": " + "\"" + Precipitacao + "\" }"; | |
//Return | |
{ | |
"dataHora": "2018-05-16T17:04:20", | |
"precipitacao": "15.5" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment