xrpc 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xrpc/basic.rb +8 -0
- data/lib/xrpc/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: e48e69127fd8c456bc554411ace1c1eb8226f9ccf771b678f9904e64a0effc9e
|
4
|
+
data.tar.gz: 34c1a233e67351045321b1548bf73c795d0ca158325b6aef8be18dffe0f1d5a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f0d689245a0db39090ed23a78f1be0c42668357cf0bddd93890dc107f899655b22473c94bf53a7b5aa31e92c818c839f57cbe9986cf0dbcefedeb3b1f581999
|
7
|
+
data.tar.gz: 648b7559cf78e5bd53acb20fe6b2d6abb0c9bc4462aa7a46ac752e5c22c463ebfa6f0f9fed65b318a11b8192da8c1188f695aebb5f5e217185918f0ca8dc03a7
|
data/lib/xrpc/basic.rb
CHANGED
@@ -53,8 +53,16 @@ module XRPC
|
|
53
53
|
def post(params)
|
54
54
|
@request_uri = URI("#{@pds}/xrpc/#{@endpoint_location}")
|
55
55
|
response = HTTParty.post(@request_uri, body: params.to_json, headers: @headers)
|
56
|
+
|
56
57
|
if response then JSON.parse(response.body) end
|
57
58
|
end
|
59
|
+
|
60
|
+
def post_without_response(params)
|
61
|
+
@request_uri = URI("#{@pds}/xrpc/#{@endpoint_location}")
|
62
|
+
response = HTTParty.post(@request_uri, body: params.to_json, headers: @headers)
|
63
|
+
|
64
|
+
response.body if response
|
65
|
+
end
|
58
66
|
end
|
59
67
|
|
60
68
|
class Error < StandardError; end
|
data/lib/xrpc/version.rb
CHANGED