summaryrefslogtreecommitdiff
path: root/sig/net/hippie/client.rbs
blob: b99ebf483832e5bb7c63a108a8f0ed6470d5a787 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
module Net
  module Hippie
    class Client
      DEFAULT_HEADERS: Hash[String, String]

      attr_reader mapper: ContentTypeMapper
      attr_reader logger: untyped
      attr_reader follow_redirects: Integer

      def initialize: (?Hash[Symbol, untyped] options) -> void

      def get: (untyped uri, ?headers: Hash[String, String], ?body: untyped, ?stream: bool) ?{ (untyped) -> void } -> untyped
      def post: (untyped uri, ?headers: Hash[String, String], ?body: untyped, ?stream: bool) ?{ (untyped) -> void } -> untyped
      def put: (untyped uri, ?headers: Hash[String, String], ?body: untyped, ?stream: bool) ?{ (untyped) -> void } -> untyped
      def patch: (untyped uri, ?headers: Hash[String, String], ?body: untyped, ?stream: bool) ?{ (untyped) -> void } -> untyped
      def delete: (untyped uri, ?headers: Hash[String, String], ?body: untyped, ?stream: bool) ?{ (untyped) -> void } -> untyped
      def head: (untyped uri, ?headers: Hash[String, String]) ?{ (untyped) -> void } -> untyped
      def options: (untyped uri, ?headers: Hash[String, String]) ?{ (untyped) -> void } -> untyped

      def execute: (untyped uri, untyped request, ?limit: Integer, ?stream: bool) ?{ (untyped) -> void } -> untyped
      def with_retry: (?retries: Integer) { (Client) -> untyped } -> untyped
      def close_all: () -> void
    end
  end
end