1

I want to resolve a captcha, so I use 2captcha service, but I don't understand about posting request by multipart.

Multipart sample:

<form method="post" action="http://2captcha.com/in.php" enctype="multipart/form-data">
    <input type="hidden" name="method" value="post">
    Your key:
    <input type="text" name="key" value="YOUR_APIKEY">
    The CAPTCHA file:
    <input type="file" name="file">
    <input type="submit" value="download and get the ID">
</form>
Zoe
  • 27,060
  • 21
  • 118
  • 148

1 Answers1

1

This is just a schematic view of the post request. Your post data will look like this: method=post&key=your_apikey&file=...

I recommend to take a look at the base64 sample, then getting the captcha image as byte [] and converting it to base64 with something like Convert.ToBase64 (...).

You can use WebClient to submit post requests.

philn
  • 313
  • 2
  • 13