Timeout
Set Read Timeout
The default read_timeout
is from net/http
which is based on the Ruby version you’re using.
HEAD
/test
HTTP/1.1
Accept: */*
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
User-Agent: rest-man/1.1.0 (darwin21 arm64) ruby/3.1.2p20
Host: example.com
HTTP/1.1
200
OK
Content-Type: text/plain
Hello world!
RestMan simple mode hasn't support timeout customization.
Please use advance or resource mode.
response = RestMan::Request.execute(
method: :get,
url: "http://example.com/test",
read_timeout: 30
)
response.code #=>200
response.headers #=> Hash
response.headers[:content_type] #=> text/plain
response.body #=> Hello world!
resource = RestMan::Resource.new(
"http://example.com/test",
read_timeout: 30
)
resposne = resource.get
response.code #=>200
response.headers #=> Hash
response.headers[:content_type] #=> text/plain
response.body #=> Hello world!
RestMan CLI hasn't support timeout customization.
Set Open Timeout
The default open_timeout
is from net/http
which is based on the Ruby version you’re using.
HEAD
/test
HTTP/1.1
Accept: */*
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
User-Agent: rest-man/1.1.0 (darwin21 arm64) ruby/3.1.2p20
Host: example.com
HTTP/1.1
200
OK
Content-Type: text/plain
Hello world!
RestMan simple mode hasn't support timeout customization.
Please use advance or resource mode.
response = RestMan::Request.execute(
method: :get,
url: "http://example.com/test",
open_timeout: 30
)
response.code #=>200
response.headers #=> Hash
response.headers[:content_type] #=> text/plain
response.body #=> Hello world!
resource = RestMan::Resource.new(
"http://example.com/test",
open_timeout: 30
)
resposne = resource.get
response.code #=>200
response.headers #=> Hash
response.headers[:content_type] #=> text/plain
response.body #=> Hello world!
RestMan CLI hasn't support timeout customization.
Set Write Timeout
The default write_timeout
is from net/http
which is based on the Ruby version you’re using.
HEAD
/test
HTTP/1.1
Accept: */*
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
User-Agent: rest-man/1.1.0 (darwin21 arm64) ruby/3.1.2p20
Host: example.com
HTTP/1.1
200
OK
Content-Type: text/plain
Hello world!
RestMan simple mode hasn't support timeout customization.
Please use advance or resource mode.
response = RestMan::Request.execute(
method: :get,
url: "http://example.com/test",
write_timeout: 30
)
response.code #=>200
response.headers #=> Hash
response.headers[:content_type] #=> text/plain
response.body #=> Hello world!
resource = RestMan::Resource.new(
"http://example.com/test",
write_timeout: 30
)
resposne = resource.get
response.code #=>200
response.headers #=> Hash
response.headers[:content_type] #=> text/plain
response.body #=> Hello world!
RestMan CLI hasn't support timeout customization.
Set SSL Timeout
The default ssl_timeout
is from net/http
which is based on the Ruby version you’re using.
HEAD
/test
HTTP/1.1
Accept: */*
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
User-Agent: rest-man/1.1.0 (darwin21 arm64) ruby/3.1.2p20
Host: example.com
HTTP/1.1
200
OK
Content-Type: text/plain
Hello world!
RestMan simple mode hasn't support timeout customization.
Please use advance or resource mode.
response = RestMan::Request.execute(
method: :get,
url: "http://example.com/test",
ssl_timeout: 30
)
response.code #=>200
response.headers #=> Hash
response.headers[:content_type] #=> text/plain
response.body #=> Hello world!
resource = RestMan::Resource.new(
"http://example.com/test",
ssl_timeout: 30
)
resposne = resource.get
response.code #=>200
response.headers #=> Hash
response.headers[:content_type] #=> text/plain
response.body #=> Hello world!
RestMan CLI hasn't support timeout customization.
Set Keep-Alive Timeout
The default keep_alive_timeout
is from net/http
which is based on the Ruby version you’re using.
HEAD
/test
HTTP/1.1
Accept: */*
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
User-Agent: rest-man/1.1.0 (darwin21 arm64) ruby/3.1.2p20
Host: example.com
HTTP/1.1
200
OK
Content-Type: text/plain
Hello world!
RestMan simple mode hasn't support timeout customization.
Please use advance or resource mode.
response = RestMan::Request.execute(
method: :get,
url: "http://example.com/test",
keep_alive_timeout: 30
)
response.code #=>200
response.headers #=> Hash
response.headers[:content_type] #=> text/plain
response.body #=> Hello world!
resource = RestMan::Resource.new(
"http://example.com/test",
keep_alive_timeout: 30
)
resposne = resource.get
response.code #=>200
response.headers #=> Hash
response.headers[:content_type] #=> text/plain
response.body #=> Hello world!
RestMan CLI hasn't support timeout customization.