Aggiunto NKC json x insomnia aggiornato

This commit is contained in:
Samuele E. Locatelli
2019-11-07 08:59:53 +01:00
parent b358b93729
commit 26e58b99a2
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -61,9 +61,11 @@ namespace NKC_SDK
string answ = "";
var client = new WebClientWT();
client.Headers.Add("user-agent", "NKC_SDK");
// importante x evitare errore 415 di dataType non ammesso
client.Headers.Add(HttpRequestHeader.ContentType, "application/json");
try
{
// va messo "PUT" e va configurato IIS per accettare PUT
answ = client.UploadString(URL, "PUT", payload);
answ = "ok";
}
File diff suppressed because one or more lines are too long