by_robot 0.0.1 → 0.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4472816e99db7354a63e611bf1cec1e1acef05d72e9eac914cd9165728377f5c
4
- data.tar.gz: ff399cfe0aa3ca17fc1b3dd65ee222cd2fbb92f2b0c37b7a611c2489b72de243
3
+ metadata.gz: 9ec48537b2d512112835afe7030f64b39f35b2154dba9fad7ef0fe21a8cfab9c
4
+ data.tar.gz: cc612eb9efe96823aa3833da4b866e512522ec8799511300c2e1471c2b32d85d
5
5
  SHA512:
6
- metadata.gz: bc5240c67c40be1a4af21fa9eddd00ed5b79c6e0c9c7319b40e23a0795eab5a67c3623d73ceb5a0572a8788916f40c5d5ea13fd6f9e311e60a33187bf36d0542
7
- data.tar.gz: 4598cfdc598d93ed1c462cb4417f05406a8f14f47341e118bd3091c7322dad1a50c9cc093986cdf5315248dd58700b217037621b25fcddc1dac61d42ef4e0d49
6
+ metadata.gz: dbba37122e659506ca29e7d35fb35007cc8bbda01530996973d6481d273114ce855d5f9cfdc1dfc87fb4b871095e092712f292e3387d3f609491e88d74dc4f08
7
+ data.tar.gz: b345cceaf0ff5c1265323b20cc5d36397f4da5aa9f12be5a3632461aba6f67e301184b3b08557bcb76b00b3fe5cb7455c393efd990e0cd5d1655630f97575a7f
@@ -15,6 +15,10 @@ module ByRobot
15
15
 
16
16
  def self.headers
17
17
  headers = {
18
+ content_type: :json,
19
+ accept: :json,
20
+ 'AcceptCharset': 'utf-8',
21
+ 'contentType': 'utf-8',
18
22
  datetime: Time.now.utc.strftime('%a, %d %b %Y %H:%M:%S GMT'),
19
23
  appkey: ByRobot.app_key
20
24
  }
@@ -28,10 +32,7 @@ module ByRobot
28
32
  end
29
33
 
30
34
  def self.post(action, params)
31
- puts "action:#{action}"
32
- puts "params:#{params}"
33
- puts "headers:#{headers}"
34
- JSON.parse RestClient.post("#{BASEURL}/#{action}", params, headers)
35
+ JSON.parse RestClient.post("#{BASEURL}/#{action}", params.to_json, headers)
35
36
  end
36
37
 
37
38
  end
@@ -1,3 +1,3 @@
1
1
  module ByRobot
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: by_robot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - liuliang