0

I am uploading data to my third party API and getting a byte[] as response. I need to read the status code from my response body as to if I am getting status code as 200 or not or if it was successfully uploaded or not. Any suggestions.

Code snippet.

var response = webClient.UploadData(postURL, "POST", formData);

response is coming as a byte[]. On using, Encoding.ASCII.GetString(resp); I simply get all the data in string format.

Yuriy Faktorovich
  • 67,283
  • 14
  • 105
  • 142
LeoNegi
  • 31
  • 11

0 Answers0