Questions tagged [uploadstring]

19 questions
0
votes
1 answer

How to add parameter to api request using WebClient.UploadString in C#

I am posting a JSON request to a web api using the WebClient.UploadString method. The JSON string is created from parsing a text file into a JSON formatted string. How do I define a parameter in the request body working with my code below? It looks…
kyle_13
  • 1,173
  • 6
  • 25
  • 47
0
votes
2 answers

How to ensure UploadStringCompletedEventHandler event has been executed successfully?

How to ensure UploadStringCompletedEventHandler event has been executed successfully ? in following code you can see i am calling function UploadMyPOST with my lastreads parameter having some data. Now you can see i am saving a variable named…
Ashish-BeJovial
  • 1,829
  • 3
  • 38
  • 62
0
votes
1 answer

POST using the uploadstring method to call a web service and pass a json array

I am attempting to do a POST to a web service. I am using the WebClient class and calling the uploadstring method. This works fine until the web service I call expects some data, particularly a json array. I am trying to find out what format the…
Popo
  • 2,402
  • 5
  • 33
  • 55
-1
votes
1 answer

UploadString of Webclient for using PUT method

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 =…
Shomaail
  • 493
  • 9
  • 30
1
2