I want to Update data using webclient UploadString method. The following code gives error saying,
The remote server returned an error: (405) Method Not Allowed.
var syncClient = new WebClient();
string URI = "https://test-khalid.herokuapp.com/v1/roles/de988992-4db8-4f75-884b-3dba893310e6";
syncClient.Headers.Add("authorization", "invalid-token");
Response.Write(syncClient.UploadString(URI, "PUT", "{\"title\":\"Shomaail Title 1\", \"role_type\":\"3\" }"));
I wrote the above code following this. Please let me know the answer?