summaryrefslogtreecommitdiff
path: root/sig/net/hippie
diff options
context:
space:
mode:
Diffstat (limited to 'sig/net/hippie')
-rw-r--r--sig/net/hippie/client.rbs25
-rw-r--r--sig/net/hippie/content_type_mapper.rbs7
2 files changed, 32 insertions, 0 deletions
diff --git a/sig/net/hippie/client.rbs b/sig/net/hippie/client.rbs
new file mode 100644
index 0000000..b99ebf4
--- /dev/null
+++ b/sig/net/hippie/client.rbs
@@ -0,0 +1,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
diff --git a/sig/net/hippie/content_type_mapper.rbs b/sig/net/hippie/content_type_mapper.rbs
new file mode 100644
index 0000000..45e60be
--- /dev/null
+++ b/sig/net/hippie/content_type_mapper.rbs
@@ -0,0 +1,7 @@
+module Net
+ module Hippie
+ class ContentTypeMapper
+ def map_from: (Hash[String, String] headers, (Hash[untyped, untyped] | String) body) -> (String | Hash[untyped, untyped])
+ end
+ end
+end