How is the HttpClient of C-sharp POST multipart/form-data?

there is a website. I need POST to get the results. The form is a string, but the site uses

.
multipart/form-data; boundary=----WebKitFormBoundarynbWPsDcpAABnZ22R
The form of

, and the content of boundary varies from browser to browser, which is above for Chrome and

for Firefox
multipart/form-data; boundary=--41184676334

I use C-sharp, which provides the MultipartFormDataContent type, but I don"t know how to use it. Can you give me an example?


boundary is equivalent to a dividing line, and it doesn't matter how you define it, so you can define it manually and at will, and the important thing is the content in form-data.
if you use a form similar to a web submission form to get the results, if you are using form-data, you can build the form content in the following form

  REST client  

					
Menu