我想要设置--data-binary和--压缩选项。在卷曲中:
curl 'http://test.url' --data-binary test_json --compressed如何在路缘中设置--data-binary和--compressed选项?
发布于 2016-11-06 07:47:44
也许这能行得通:
ce = Curl::Easy.new("http://test.url")
ce.encoding = 'gzip'
ce.multipart_form_post = true
fields = [
Curl::PostField.file('foo', foo_file_path),
Curl::PostField.file('bar', bar_file_path)
]
curl.http_post(fields)
ce.perform响应正文采用ce.body_str格式
https://stackoverflow.com/questions/35285294
复制相似问题