class X::Connection
- X::Connection
- Reference
- Object
Overview
Sends HTTP requests
Defined in:
x/connection.crConstant Summary
-
DEFAULT_BASE_URL =
URI.parse("https://api.twitter.com/2/")
-
DEFAULT_CONNECT_TIMEOUT =
60.seconds
-
DEFAULT_HOST =
"https://api.twitter.com"
-
DEFAULT_PORT =
443
-
DEFAULT_READ_TIMEOUT =
60.seconds
-
DEFAULT_WRITE_TIMEOUT =
60.seconds
-
NETWORK_ERRORS =
[IO::TimeoutError]
Constructors
Instance Method Summary
- #base_uri : URI
- #base_uri=(base_uri : URI)
- #base_uri? : URI | Nil
- #connect_timeout : Time::Span
- #connect_timeout=(connect_timeout : Time::Span)
- #http_client : HTTP::Client
- #http_client=(http_client : HTTP::Client)
- #http_client? : HTTP::Client | Nil
- #read_timeout : Time::Span
- #read_timeout=(read_timeout : Time::Span)
- #send_request(request : HTTP::Request)
- #write_timeout : Time::Span
- #write_timeout=(write_timeout : Time::Span)
Constructor Detail
def self.new(base_uri : Nil | URI = DEFAULT_BASE_URL, connect_timeout : Time::Span = DEFAULT_CONNECT_TIMEOUT, read_timeout : Time::Span = DEFAULT_READ_TIMEOUT, write_timeout : Time::Span = DEFAULT_WRITE_TIMEOUT)
#