How to use WebRequest to POST some data and read response?

后端 未结 5 437
南方客
南方客 2021-02-01 06:03

Need to have the server make a POST to an API, how do I add POST values to a WebRequest object and how do I send it and get the response (it will be a string) out?

I nee

5条回答
  •  深忆病人
    2021-02-01 06:56

    A more powerful and flexible example can be found here: C# File Upload with form fields, cookies and headers

提交回复
热议问题