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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f4c7af719721f6960936c4dd967a7ff407460ab99adf73168c0abdeec609c7a
4
- data.tar.gz: 9a366f9b9bf327101e18d94ae1413106f8d6b3404b6b638c12447bc0a2d66795
3
+ metadata.gz: e48e69127fd8c456bc554411ace1c1eb8226f9ccf771b678f9904e64a0effc9e
4
+ data.tar.gz: 34c1a233e67351045321b1548bf73c795d0ca158325b6aef8be18dffe0f1d5a8
5
5
  SHA512:
6
- metadata.gz: a3861268b173caae679601b7962da6add63a17d51f17f8f3baac5994befac5be1880c0b031e295b18579f018823a2d0f6d878ea9d17dc27588f41249050e7edb
7
- data.tar.gz: a133c6ed0e072e161b18e47e382cd19309ca122e99816705b3120091d26ea438e64af1f588eaf9ca827a039e03bf216ae91b22d4b4f2bf5718ce97f8d3e9279d
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module XRPC
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xrpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shreyan Jain