openai-assistant 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/http/http.rb +9 -9
- data/lib/openai/assistant/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96a8f05d752820cc1e3249578c09c2d01be9b1226947b429391c1912384ef13c
|
4
|
+
data.tar.gz: 5e23932e45833891e126511527e6988b14e54c302c5d7fb27cb4e5b10da253ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c73814b136ebb0a063d3c19b4eec1df87956dd3747ffa85af703cf69af7fec39dac13d76586c66a72aefb80eebfa2e7d89e97b01f0ca6f57a767bd343ab3521
|
7
|
+
data.tar.gz: 141ff54de362fee03d05f7f61c2e20d476d4c1a3ae55373374b369dc266338f53d6368920ed69d83c29925abc9f40a678f2d80890e749b005066daaa7524853b
|
data/lib/http/http.rb
CHANGED
@@ -6,25 +6,25 @@ require "json"
|
|
6
6
|
module Http
|
7
7
|
# An http client
|
8
8
|
class Client
|
9
|
-
def call_post(
|
10
|
-
http = Net::HTTP.new(
|
9
|
+
def call_post(url, req_body, headers)
|
10
|
+
http = Net::HTTP.new(url.host, url.port)
|
11
11
|
http.use_ssl = true
|
12
|
-
request = Net::HTTP::Post.new(
|
12
|
+
request = Net::HTTP::Post.new(url.path, headers)
|
13
13
|
request.body = req_body unless req_body.nil?
|
14
14
|
http.request(request)
|
15
15
|
end
|
16
16
|
|
17
|
-
def call_delete(
|
18
|
-
http = Net::HTTP.new(
|
17
|
+
def call_delete(url, headers)
|
18
|
+
http = Net::HTTP.new(url.host, url.port)
|
19
19
|
http.use_ssl = true
|
20
|
-
request = Net::HTTP::Delete.new(
|
20
|
+
request = Net::HTTP::Delete.new(url.path, headers)
|
21
21
|
http.request(request)
|
22
22
|
end
|
23
23
|
|
24
|
-
def call_get(
|
25
|
-
http = Net::HTTP.new(
|
24
|
+
def call_get(url, headers)
|
25
|
+
http = Net::HTTP.new(url.host, url.port)
|
26
26
|
http.use_ssl = true
|
27
|
-
request = Net::HTTP::Get.new(
|
27
|
+
request = Net::HTTP::Get.new(url.path, headers)
|
28
28
|
http.request(request)
|
29
29
|
end
|
30
30
|
end
|