Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Hoppscotch | 51,752 | 1 | 6 hours ago | 1 | March 22, 2022 | 146 | mit | TypeScript | ||
👽 Open source API development ecosystem - https://hoppscotch.io | ||||||||||
Httpie | 27,856 | 1,645 | 42 | 12 days ago | 55 | May 06, 2022 | 146 | bsd-3-clause | Python | |
🥧 HTTPie for Terminal — modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. | ||||||||||
Postgrest | 20,617 | 4 | 3 days ago | 37 | July 12, 2022 | 207 | mit | Haskell | ||
REST API for any Postgres database | ||||||||||
Okhttp Okgo | 10,444 | 9 months ago | 461 | apache-2.0 | Java | |||||
OkGo - 3.0 震撼来袭,该库是基于 Http 协议,封装了 OkHttp 的网络请求框架,比 Retrofit 更简单易用,支持 RxJava,RxJava2,支持自定义缓存,支持批量断点下载管理和批量上传管理功能 | ||||||||||
Falcon | 9,113 | 3 | a day ago | 4 | March 25, 2022 | 155 | apache-2.0 | Python | ||
The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale. | ||||||||||
Cowboy | 6,956 | 9,060 | 286 | a month ago | 23 | May 12, 2021 | 106 | isc | Erlang | |
Small, fast, modern HTTP server for Erlang/OTP. | ||||||||||
Rest Assured | 6,349 | 7,364 | 395 | 2 months ago | 29 | September 09, 2022 | 503 | apache-2.0 | Java | |
Java DSL for easy testing of REST services | ||||||||||
Wiremock | 5,580 | 1,626 | 752 | 16 hours ago | 104 | September 10, 2020 | 313 | apache-2.0 | Java | |
A tool for mocking HTTP services | ||||||||||
Rest Client | 5,175 | 52,472 | 4,202 | 8 months ago | 65 | August 22, 2019 | 146 | mit | Ruby | |
Simple HTTP and REST client for Ruby, inspired by microframework syntax for specifying actions. | ||||||||||
Restful Api Design References | 4,823 | 2 years ago | 2 | mit | ||||||
RESTful API 设计参考文献列表,可帮助你更加彻底的了解REST风格的接口设计。 |
Nap is an extremely simple REST client for Ruby. It was built to quickly fire off HTTP requests without having to research net/http internals.
gem 'nap'
require 'rest'
require 'json'
response = REST.get('http://twitter.com/statuses/friends_timeline.json', {},
{:username => '_evan', :password => 'buttonscat'}
)
if response.ok?
timeline = JSON.parse(response.body)
puts(timeline.map do |item|
"#{item['user']['name']}\n\n#{item['text']}"
end.join("\n\n--\n\n"))
elsif response.forbidden?
puts "Are you sure you're `_evan' and your password is the name of your cat?"
else
puts "Something went wrong (#{response.status_code})"
puts response.body
end
If you need more control over the Net::HTTP request you can pass a block to all of the request methods.
response = REST.get('http://google.com') do |http_request|
http_request.open_timeout = 15
http_request.set_debug_output(STDERR)
end
To enable the proxy settings in Nap, you can either use the HTTP_PROXY or http_proxy enviroment variable.
$ env HTTP_PROXY=http://rob:[email protected]:665 ruby app.rb
Nap defines one top-level and three main error types which allow you to catch a whole range of exceptions thrown by underlying protocol implementations.
In the most basic case you can rescue from the top-level type to warn about fetching problems.
begin
REST.get('http://example.com/pigeons/12')
rescue REST::Error
puts "[!] Failed to fetch Pigeon number 12."
end
Nap couldn't be the shining beacon in the eternal darkness without help from:
For all other great human beings, please visit the GitHub contributors page.