Equivalent of cURL for Ruby?

前端 未结 12 2597
不知归路
不知归路 2020-11-29 00:33

Is there a cURL library for Ruby?

相关标签:
12条回答
  • 2020-11-29 01:00

    If you like it less low-level, there is also Typhoeus, which is built on top of Curl::Multi.

    0 讨论(0)
  • 2020-11-29 01:04

    Curb and Curl::Multi provide cURL bindings for Ruby.

    0 讨论(0)
  • 2020-11-29 01:05

    There's also Mechanize, which is a very high-level web scraping client, and uses Nokogiri for HTML parsing.

    0 讨论(0)
  • 2020-11-29 01:06

    If you know how to write your request as a curl command, there is an online tool that can turn it into ruby (2.0+) code: curl-to-ruby

    Currently, it knows the following options: -d/--data, -H/--header, -I/--head, -u/--user, --url, and -X/--request. It is open to contributions.

    0 讨论(0)
  • 2020-11-29 01:08

    Adding a more recent answer, HTTPClient is another Ruby library that uses libcurl, supports parallel threads and lots of the curl goodies. I use HTTPClient and Typhoeus for any non-trivial apps.

    0 讨论(0)
  • 2020-11-29 01:09

    HTTP clients is a good page to help you make decisions about the various clients.

    0 讨论(0)
提交回复
热议问题