On this page
Overview
HTTParty is an HTTP client library for calling web APIs from Ruby applications and scripts. It supports immediate requests through class methods such as HTTParty.get, while include HTTParty, base_uri, and shared options can organize endpoints into service-specific client classes. Responses expose the body, status code, message, and headers, and the bundled CLI can help inspect an API's output structure.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Fetch an HTTP response and inspect its body, status, and headers
HTTParty.get sends a request to a URL and returns an object exposing body, code, message, and headers. Small integrations that consume JSON, XML, or text responses can begin with a short Ruby call.
Sources: [2]
Collect endpoint defaults in a class and inspect services from the CLI
Including HTTParty in a class and defining base_uri plus shared query options keeps related endpoints in one API client. The bundled httparty executable can query a web service and, by default, print the response as a formatted Ruby object for structural inspection.
Sources: [2]
Best fit
Fits concise API integrations and exploratory Ruby scripts
It is useful for SaaS API calls, straightforward service-to-service HTTP integrations, and short scripts that inspect response formats. A client class per service can keep common URLs and parameters out of individual call sites.
Sources: [2]
Before adoption
Provide Ruby 2.7 or newer and design failure, credential, and URL boundaries in the application
Version 0.24.3 requires Ruby 2.7 or newer. The library simplifies requests, but the caller remains responsible for timeouts, retries, rate limits, credential storage and redaction, and validation of URLs built from external input. Version 0.24.3 adds JSON gem 3.x support and fixes parsing of BOM-prefixed responses, so upgrades should regression-test encoding and parsed values. The project uses the MIT license.
Official sources
- [1]jnunemaker/httparty repository metadata(2026-10-04)
- [2]HTTParty v0.24.3 README(2026-10-04)
- [3]HTTParty v0.24.3 release(2026-10-04)
- [4]HTTParty v0.24.3 gem specification(2026-10-04)
- [5]HTTParty v0.24.3 MIT license(2026-10-04)
Supplemental curator note
HTTParty keeps small API integrations concise, but the application still owns credential handling, timeouts, retries, and validation of URLs derived from external input. Compare clients on failure control and observability as well as syntax.
Try it in 3 steps
- 1
Check the Ruby version
Confirm that Ruby 2.7 or newer is available for v0.24.3.
ruby --version - 2
Install the reviewed stable release
Follow the README gem installation while pinning the reviewed release.
gem install httparty -v 0.24.3 - 3
Check a GET response from a public page
Use the class method to send a GET request and print the HTTP status code.
ruby -r httparty -e 'r=HTTParty.get("https://example.com"); puts r.code'
Growth
Growth trends · Last 30 days
5,901 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 21
- Open PRs
- 9
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- httparty
- ruby
- http
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- mysql22,275 Stars
1 shared tag(s) · 1 shared category(s) · Same language
connect Ruby to MySQL or MariaDB and handle SQL queries, prepared statements, and streaming results
Ruby - RSpec117 Stars
1 shared tag(s) · 1 shared category(s) · Same language
describe Ruby behavior with examples, expectations, and test doubles and run it through a CLI
Ruby - Axios109,258 Stars
1 shared tag(s) · 1 shared category(s)
Share interceptors, adapters, timeouts, and cancellation across browser and Node.js HTTP requests
JavaScript - Bruno47,337 Stars
1 shared tag(s) · 1 shared category(s)
manage API collections as local Bru files in Git and run them from desktop, CLI, or CI
JavaScript - Alamofire42,406 Stars
1 shared tag(s) · 1 shared category(s)
build Swift HTTP networking on URLSession with concise requests, retries, uploads, downloads, and TLS pinning
Swift - Netty35,065 Stars
1 shared tag(s) · 1 shared category(s)
Build high-connection protocol servers and clients in Java from event loops and channel pipelines
Java
Report incorrect information
Tell us if any listing information is incorrect or outdated.