zyxt 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/request_client.rb +12 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4be2c7d55df6bea80257448d669377d2ab5cb28f102724ae5898db6f8392e568
4
- data.tar.gz: 598ffe0bd132832e8727d67e0d46e125aff29951387ab599ba558efff1d78d1d
3
+ metadata.gz: 58786dd2a040a7bc920364eabc49f5810dc4dffaf2dc28fc3fa6d195c5713053
4
+ data.tar.gz: 32d7615d2b07bcb3251383ef8f13977400221ab3586ae4544c322e9fcbc00a89
5
5
  SHA512:
6
- metadata.gz: 269ed73f0ef00e046631acc408a083e0a03ebe155b75dc68f44fe356aa722dc67d5d46bb658cdd9138c65be2fd3c55e648368d3df0109cd19fb1ea04c2701147
7
- data.tar.gz: 4c20ba397800127033e1e3794ee781a93158ffa0fc8befc0d49d3d3e7892a0fe0fc71259c8daadae377534f629d9ceddec86b84cd0ceb02081902e8f8af2e7ec
6
+ metadata.gz: c495422a60c48c353c50029b4f46d7c37dc5857dd9c20d76e42603cd91cf312f8d6b8f99dbcf3ef9d78eef48f2d893d6bfa0b4287f3219ab9985486adb63f8a6
7
+ data.tar.gz: 3b368a160910b098e8d1f1cb0387ea5867327be49e19ac8eda8887ce871c9dd48731931c937e688556e381294fd28567a8e9b6c012b383eb261ad21f615f4d35
@@ -9,24 +9,32 @@ module RequestClient
9
9
 
10
10
  desc "get URL", "execute GET request to URL"
11
11
  def get(url)
12
- puts Request::Http.send_request("get", url)
12
+ response = Request::Http.send_request("get", url)
13
+ puts "Status Code: #{response.code}"
14
+ puts "Body: #{response.body}"
13
15
  end
14
16
 
15
17
  desc "post URL", "execute POST request to URL"
16
18
  option :body, :type => :hash, :desc => "Body of the request"
17
19
  def post(url)
18
- puts Request::Http.send_request("post", url, options[:body])
20
+ response = Request::Http.send_request("post", url, options[:body])
21
+ puts "Status Code: #{response.code}"
22
+ puts "Body: #{response.body}"
19
23
  end
20
24
 
21
25
  desc "put URL", "execute PUT request to URL"
22
26
  option :body, :type => :hash, :desc => "Body of the request"
23
27
  def put(url)
24
- puts Request::Http.send_request("put", url, options[:body])
28
+ response = Request::Http.send_request("put", url, options[:body])
29
+ puts "Status Code: #{response.code}"
30
+ puts "Body: #{response.body}"
25
31
  end
26
32
 
27
33
  desc "delete URL", "execute DELETE request to URL"
28
34
  def delete(url)
29
- puts Request::Http.send_request("delete", url)
35
+ response = Request::Http.send_request("delete", url)
36
+ puts "Status Code: #{response.code}"
37
+ puts "Body: #{response.body}"
30
38
  end
31
39
  end
32
40
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zyxt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Matsumoto