Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
1b09301
Merge pull request #132 from SearchApi/demo/preserve-json-integer-pre…
0x676e67 Jul 15, 2026
aabb4a6
Merge pull request #133 from SearchApi/demo/validate-body-sender-life…
0x676e67 Jul 15, 2026
5488d02
feat(client): accept sub-second timeouts
0x676e67 Jul 16, 2026
fca217f
Clarify timeout and TCP option documentation
0x676e67 Jul 16, 2026
535c42d
Merge pull request #134 from SearchApi/demo/reject-invalid-client-req…
0x676e67 Jul 17, 2026
2c8cf43
feat: give native HTTP value types ruby value semantics (#139)
arishgithub Jul 17, 2026
67ad922
fix: ruby macro undefined issue (#140)
arishgithub Jul 21, 2026
b7b3e01
refactor(enum): centralize Ruby value methods (#141)
0x676e67 Jul 21, 2026
6a15224
Merge branch 'main' into demo/safe-cookie-expiry-semantics-114
0x676e67 Jul 21, 2026
343fd5d
Merge branch 'demo/safe-cookie-expiry-semantics-114' into demo/reject…
0x676e67 Jul 21, 2026
a602b83
Merge branch 'demo/reject-forked-runtime-use-112' into demo/accept-su…
0x676e67 Jul 21, 2026
14e3ef2
test(cookie): cover numeric expiry semantics
0x676e67 Jul 21, 2026
4ec84e6
feat(cookie): expose idiomatic Ruby APIs (#142)
0x676e67 Jul 21, 2026
58a1011
Merge branch 'demo/safe-cookie-expiry-semantics-114' into demo/reject…
0x676e67 Jul 22, 2026
236d3e6
Merge branch 'demo/reject-forked-runtime-use-112' into demo/accept-su…
0x676e67 Jul 22, 2026
138e746
docs(cookie): clarify cookie API behavior
0x676e67 Jul 23, 2026
8a7bf25
Merge branch 'demo/safe-cookie-expiry-semantics-114' into demo/reject…
0x676e67 Jul 23, 2026
4f8de6e
Merge branch 'demo/reject-forked-runtime-use-112' into demo/accept-su…
0x676e67 Jul 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 55 additions & 18 deletions lib/wreq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

# Load type hint definitions
require_relative "wreq_ruby/http"
require_relative "wreq_ruby/emulate"
require_relative "wreq_ruby/client"
require_relative "wreq_ruby/response"
require_relative "wreq_ruby/body"
Expand Down Expand Up @@ -50,8 +51,12 @@ module Wreq
# @param brotli [Boolean, nil] Enable Brotli compression
# @param deflate [Boolean, nil] Enable deflate compression
# @param zstd [Boolean, nil] Enable Zstandard compression
# @param timeout [Integer, nil] Total request timeout (seconds)
# @param read_timeout [Integer, nil] Per-chunk read timeout (seconds)
# @param timeout [Numeric, nil] Total request timeout in seconds.
# Must be finite and non-negative; fractions are accepted, 0 expires
# immediately, and nil leaves it unset.
# @param read_timeout [Numeric, nil] Per-chunk read timeout in seconds.
# Must be finite and non-negative; fractions are accepted, 0 expires
# immediately, and nil leaves it unset.
# @param proxy [String, nil] Proxy server URI
# @param local_address [String, nil] Bind the client's local source IP address (IPv4/IPv6). Useful on multi-homed hosts to originate connections from a specific address or enforce source routing. Examples: "192.168.1.10", "10.0.0.5", "2001:db8::1". The address must exist on the host and be routable or the connection may fail.
# @param interface [String, nil] Bind to an interface on supported platforms; unsupported platforms raise ArgumentError.
Expand Down Expand Up @@ -83,8 +88,12 @@ def self.request(method, url, **options)
# @param brotli [Boolean, nil] Enable Brotli compression
# @param deflate [Boolean, nil] Enable deflate compression
# @param zstd [Boolean, nil] Enable Zstandard compression
# @param timeout [Integer, nil] Total request timeout (seconds)
# @param read_timeout [Integer, nil] Per-chunk read timeout (seconds)
# @param timeout [Numeric, nil] Total request timeout in seconds.
# Must be finite and non-negative; fractions are accepted, 0 expires
# immediately, and nil leaves it unset.
# @param read_timeout [Numeric, nil] Per-chunk read timeout in seconds.
# Must be finite and non-negative; fractions are accepted, 0 expires
# immediately, and nil leaves it unset.
# @param proxy [String, nil] Proxy server URI
# @param local_address [String, nil] Bind the client's local source IP address (IPv4/IPv6). Useful on multi-homed hosts to originate connections from a specific address or enforce source routing. Examples: "192.168.1.10", "10.0.0.5", "2001:db8::1". The address must exist on the host and be routable or the connection may fail.
# @param interface [String, nil] Bind to an interface on supported platforms; unsupported platforms raise ArgumentError.
Expand Down Expand Up @@ -116,8 +125,12 @@ def self.get(url, **options)
# @param brotli [Boolean, nil] Enable Brotli compression
# @param deflate [Boolean, nil] Enable deflate compression
# @param zstd [Boolean, nil] Enable Zstandard compression
# @param timeout [Integer, nil] Total request timeout (seconds)
# @param read_timeout [Integer, nil] Per-chunk read timeout (seconds)
# @param timeout [Numeric, nil] Total request timeout in seconds.
# Must be finite and non-negative; fractions are accepted, 0 expires
# immediately, and nil leaves it unset.
# @param read_timeout [Numeric, nil] Per-chunk read timeout in seconds.
# Must be finite and non-negative; fractions are accepted, 0 expires
# immediately, and nil leaves it unset.
# @param proxy [String, nil] Proxy server URI
# @param local_address [String, nil] Bind the client's local source IP address (IPv4/IPv6). Useful on multi-homed hosts to originate connections from a specific address or enforce source routing. Examples: "192.168.1.10", "10.0.0.5", "2001:db8::1". The address must exist on the host and be routable or the connection may fail.
# @param interface [String, nil] Bind to an interface on supported platforms; unsupported platforms raise ArgumentError.
Expand Down Expand Up @@ -149,8 +162,12 @@ def self.head(url, **options)
# @param brotli [Boolean, nil] Enable Brotli compression
# @param deflate [Boolean, nil] Enable deflate compression
# @param zstd [Boolean, nil] Enable Zstandard compression
# @param timeout [Integer, nil] Total request timeout (seconds)
# @param read_timeout [Integer, nil] Per-chunk read timeout (seconds)
# @param timeout [Numeric, nil] Total request timeout in seconds.
# Must be finite and non-negative; fractions are accepted, 0 expires
# immediately, and nil leaves it unset.
# @param read_timeout [Numeric, nil] Per-chunk read timeout in seconds.
# Must be finite and non-negative; fractions are accepted, 0 expires
# immediately, and nil leaves it unset.
# @param proxy [String, nil] Proxy server URI
# @param local_address [String, nil] Bind the client's local source IP address (IPv4/IPv6). Useful on multi-homed hosts to originate connections from a specific address or enforce source routing. Examples: "192.168.1.10", "10.0.0.5", "2001:db8::1". The address must exist on the host and be routable or the connection may fail.
# @param interface [String, nil] Bind to an interface on supported platforms; unsupported platforms raise ArgumentError.
Expand Down Expand Up @@ -182,8 +199,12 @@ def self.post(url, **options)
# @param brotli [Boolean, nil] Enable Brotli compression
# @param deflate [Boolean, nil] Enable deflate compression
# @param zstd [Boolean, nil] Enable Zstandard compression
# @param timeout [Integer, nil] Total request timeout (seconds)
# @param read_timeout [Integer, nil] Per-chunk read timeout (seconds)
# @param timeout [Numeric, nil] Total request timeout in seconds.
# Must be finite and non-negative; fractions are accepted, 0 expires
# immediately, and nil leaves it unset.
# @param read_timeout [Numeric, nil] Per-chunk read timeout in seconds.
# Must be finite and non-negative; fractions are accepted, 0 expires
# immediately, and nil leaves it unset.
# @param proxy [String, nil] Proxy server URI
# @param local_address [String, nil] Bind the client's local source IP address (IPv4/IPv6). Useful on multi-homed hosts to originate connections from a specific address or enforce source routing. Examples: "192.168.1.10", "10.0.0.5", "2001:db8::1". The address must exist on the host and be routable or the connection may fail.
# @param interface [String, nil] Bind to an interface on supported platforms; unsupported platforms raise ArgumentError.
Expand Down Expand Up @@ -215,8 +236,12 @@ def self.put(url, **options)
# @param brotli [Boolean, nil] Enable Brotli compression
# @param deflate [Boolean, nil] Enable deflate compression
# @param zstd [Boolean, nil] Enable Zstandard compression
# @param timeout [Integer, nil] Total request timeout (seconds)
# @param read_timeout [Integer, nil] Per-chunk read timeout (seconds)
# @param timeout [Numeric, nil] Total request timeout in seconds.
# Must be finite and non-negative; fractions are accepted, 0 expires
# immediately, and nil leaves it unset.
# @param read_timeout [Numeric, nil] Per-chunk read timeout in seconds.
# Must be finite and non-negative; fractions are accepted, 0 expires
# immediately, and nil leaves it unset.
# @param proxy [String, nil] Proxy server URI
# @param local_address [String, nil] Bind the client's local source IP address (IPv4/IPv6). Useful on multi-homed hosts to originate connections from a specific address or enforce source routing. Examples: "192.168.1.10", "10.0.0.5", "2001:db8::1". The address must exist on the host and be routable or the connection may fail.
# @param interface [String, nil] Bind to an interface on supported platforms; unsupported platforms raise ArgumentError.
Expand Down Expand Up @@ -248,8 +273,12 @@ def self.delete(url, **options)
# @param brotli [Boolean, nil] Enable Brotli compression
# @param deflate [Boolean, nil] Enable deflate compression
# @param zstd [Boolean, nil] Enable Zstandard compression
# @param timeout [Integer, nil] Total request timeout (seconds)
# @param read_timeout [Integer, nil] Per-chunk read timeout (seconds)
# @param timeout [Numeric, nil] Total request timeout in seconds.
# Must be finite and non-negative; fractions are accepted, 0 expires
# immediately, and nil leaves it unset.
# @param read_timeout [Numeric, nil] Per-chunk read timeout in seconds.
# Must be finite and non-negative; fractions are accepted, 0 expires
# immediately, and nil leaves it unset.
# @param proxy [String, nil] Proxy server URI
# @param local_address [String, nil] Bind the client's local source IP address (IPv4/IPv6). Useful on multi-homed hosts to originate connections from a specific address or enforce source routing. Examples: "192.168.1.10", "10.0.0.5", "2001:db8::1". The address must exist on the host and be routable or the connection may fail.
# @param interface [String, nil] Bind to an interface on supported platforms; unsupported platforms raise ArgumentError.
Expand Down Expand Up @@ -281,8 +310,12 @@ def self.options(url, **options)
# @param brotli [Boolean, nil] Enable Brotli compression
# @param deflate [Boolean, nil] Enable deflate compression
# @param zstd [Boolean, nil] Enable Zstandard compression
# @param timeout [Integer, nil] Total request timeout (seconds)
# @param read_timeout [Integer, nil] Per-chunk read timeout (seconds)
# @param timeout [Numeric, nil] Total request timeout in seconds.
# Must be finite and non-negative; fractions are accepted, 0 expires
# immediately, and nil leaves it unset.
# @param read_timeout [Numeric, nil] Per-chunk read timeout in seconds.
# Must be finite and non-negative; fractions are accepted, 0 expires
# immediately, and nil leaves it unset.
# @param proxy [String, nil] Proxy server URI
# @param local_address [String, nil] Bind the client's local source IP address (IPv4/IPv6). Useful on multi-homed hosts to originate connections from a specific address or enforce source routing. Examples: "192.168.1.10", "10.0.0.5", "2001:db8::1". The address must exist on the host and be routable or the connection may fail.
# @param interface [String, nil] Bind to an interface on supported platforms; unsupported platforms raise ArgumentError.
Expand Down Expand Up @@ -314,8 +347,12 @@ def self.trace(url, **options)
# @param brotli [Boolean, nil] Enable Brotli compression
# @param deflate [Boolean, nil] Enable deflate compression
# @param zstd [Boolean, nil] Enable Zstandard compression
# @param timeout [Integer, nil] Total request timeout (seconds)
# @param read_timeout [Integer, nil] Per-chunk read timeout (seconds)
# @param timeout [Numeric, nil] Total request timeout in seconds.
# Must be finite and non-negative; fractions are accepted, 0 expires
# immediately, and nil leaves it unset.
# @param read_timeout [Numeric, nil] Per-chunk read timeout in seconds.
# Must be finite and non-negative; fractions are accepted, 0 expires
# immediately, and nil leaves it unset.
# @param proxy [String, nil] Proxy server URI
# @param local_address [String, nil] Bind the client's local source IP address (IPv4/IPv6). Useful on multi-homed hosts to originate connections from a specific address or enforce source routing. Examples: "192.168.1.10", "10.0.0.5", "2001:db8::1". The address must exist on the host and be routable or the connection may fail.
# @param interface [String, nil] Bind to an interface on supported platforms; unsupported platforms raise ArgumentError.
Expand Down
Loading