我正在尝试向以下API发送POST请求:https://2captcha.com/2captcha-api(请看普通的验证码)。
这是我的代码
library(httr)
captcha_apth <- paste0("my_image_path.jpeg")
output <- httr::POST(
url = api_url,
body = list(key = api_key, method = "post", file = httr::upload_file(captcha_apth)),
encoding = "multipart",
)
但返回错误:
ERROR_ZERO_CAPTCHA_FILESIZE
似乎它没有上传图片,但我不知道为什么?