diff --git a/stdlib/net-http/0/manifest.yaml b/stdlib/net-http/0/manifest.yaml index 47fd182d6..ff82a251c 100644 --- a/stdlib/net-http/0/manifest.yaml +++ b/stdlib/net-http/0/manifest.yaml @@ -1,3 +1,3 @@ dependencies: + - name: net-protocol - name: uri - - name: timeout diff --git a/stdlib/net-http/0/net-http.rbs b/stdlib/net-http/0/net-http.rbs index 109c71b44..4b249a559 100644 --- a/stdlib/net-http/0/net-http.rbs +++ b/stdlib/net-http/0/net-http.rbs @@ -1,59 +1,10 @@ module Net - class Protocol - VERSION: String - end - - class ProtocolError < StandardError - end - - class ProtoSyntaxError < ProtocolError - end - - class ProtoFatalError < ProtocolError - end - - class ProtoUnknownError < ProtocolError - end - - class ProtoServerError < ProtocolError - end - - class ProtoAuthError < ProtocolError - end - - class ProtoCommandError < ProtocolError - end - - class ProtoRetriableError < ProtocolError - end - class HTTPBadResponse < StandardError end class HTTPHeaderSyntaxError < StandardError end - # - # OpenTimeout, a subclass of Timeout::Error, is raised if a connection cannot be - # created within the open_timeout. - # - class OpenTimeout < Timeout::Error - end - - # - # ReadTimeout, a subclass of Timeout::Error, is raised if a chunk of the - # response cannot be read within the read_timeout. - # - class ReadTimeout < Timeout::Error - end - - # - # WriteTimeout, a subclass of Timeout::Error, is raised if a chunk of the - # response cannot be written within the write_timeout. Not raised on Windows. - # - class WriteTimeout < Timeout::Error - end - # # Class Net::HTTP provides a rich library that implements the client in a # client-server model that uses the HTTP request-response protocol. For diff --git a/stdlib/net-protocol/0/manifest.yaml b/stdlib/net-protocol/0/manifest.yaml new file mode 100644 index 000000000..76f5f2209 --- /dev/null +++ b/stdlib/net-protocol/0/manifest.yaml @@ -0,0 +1,2 @@ +dependencies: + - name: timeout diff --git a/stdlib/net-protocol/0/net-protocol.rbs b/stdlib/net-protocol/0/net-protocol.rbs new file mode 100644 index 000000000..e6416afd5 --- /dev/null +++ b/stdlib/net-protocol/0/net-protocol.rbs @@ -0,0 +1,56 @@ +module Net + class Protocol + VERSION: String + end + + class ProtocolError < StandardError + end + + class ProtoSyntaxError < ProtocolError + end + + class ProtoFatalError < ProtocolError + end + + class ProtoUnknownError < ProtocolError + end + + class ProtoServerError < ProtocolError + end + + class ProtoAuthError < ProtocolError + end + + class ProtoCommandError < ProtocolError + end + + class ProtoRetriableError < ProtocolError + end + + class HTTPBadResponse < StandardError + end + + class HTTPHeaderSyntaxError < StandardError + end + + # + # OpenTimeout, a subclass of Timeout::Error, is raised if a connection cannot be + # created within the open_timeout. + # + class OpenTimeout < Timeout::Error + end + + # + # ReadTimeout, a subclass of Timeout::Error, is raised if a chunk of the + # response cannot be read within the read_timeout. + # + class ReadTimeout < Timeout::Error + end + + # + # WriteTimeout, a subclass of Timeout::Error, is raised if a chunk of the + # response cannot be written within the write_timeout. Not raised on Windows. + # + class WriteTimeout < Timeout::Error + end +end