json_requester 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/json_requester.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e1df20023411b7a5567297f88b898a79e92732fea4b526cc49b8bc1632dc11f
|
4
|
+
data.tar.gz: 5061adce106e50c69bdad3b3867d520d9078151037e9abdbf12861ffba3efae1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f951b7f470bfeadce95892e96da335cfb821c435b4cf3697b488ed12a4fd53b5395538c260896168ee159e19caf011ba211452ce088f014fc3ebfffff7f072bd
|
7
|
+
data.tar.gz: 109a9ce7779e9a5a91d3debd12ab6199f68ef6a811d53c6aacd5f9938b9f373811047acd4404f289c9ddf969bf4b565f5acba212bacf6a29a74a0210f5afdd39
|
data/lib/json_requester.rb
CHANGED
@@ -4,9 +4,10 @@ require 'json'
|
|
4
4
|
class JsonRequester
|
5
5
|
attr_reader :host, :conn
|
6
6
|
|
7
|
-
def initialize(host, multipart: false)
|
7
|
+
def initialize(host, multipart: false, ssl_verify: true)
|
8
8
|
@host = host
|
9
9
|
@multipart = multipart
|
10
|
+
@ssl_verify = ssl_verify
|
10
11
|
end
|
11
12
|
|
12
13
|
def http_send(http_method, path, params={}, headers={})
|
@@ -69,7 +70,7 @@ class JsonRequester
|
|
69
70
|
private
|
70
71
|
|
71
72
|
def init_conn
|
72
|
-
Faraday.new(url: host) do |faraday|
|
73
|
+
Faraday.new(url: host, ssl: { verify: @ssl_verify }) do |faraday|
|
73
74
|
faraday.request :multipart if @multipart # multipart form POST request
|
74
75
|
faraday.request :url_encoded # form-encode POST params
|
75
76
|
faraday.response :logger # log requests to $stdout
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_requester
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JiaRou Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|