json_requester 1.0.7 → 1.0.9
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 +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97dd6e0bf2910e13ec4badfedeed6a2e81d31c728e12e25eab181a1c8cc25ef9
|
4
|
+
data.tar.gz: f93f5fa627e90339bf734b8e96367bdf6924f18c6f747625bedabd943ba97cba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39f4cda3e36460c8f8647513823974c90211a12ac509e495a3c79188381c07eb217f2abc7d874f094d7276b1c3fe5166bf87fc15b0e3d21f4a81e828340cd629
|
7
|
+
data.tar.gz: fe699ae45d3d99e81d1b15e48e6a0e0219ebf2ca8b75f144a028091664bbe9dbcf473c2a1aa294db2bc2fe3a998e6a90d2f1c0493c6a933ab91ec9a41849c141
|
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.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JiaRou Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -36,7 +36,9 @@ files:
|
|
36
36
|
homepage: https://github.com/kdan-mobile-software-ltd/json_requester
|
37
37
|
licenses:
|
38
38
|
- MIT
|
39
|
-
metadata:
|
39
|
+
metadata:
|
40
|
+
source_code_uri: https://github.com/kdan-mobile-software-ltd/json_requester
|
41
|
+
changelog_uri: https://github.com/kdan-mobile-software-ltd/json_requester/blob/master/CHANGELOG.md
|
40
42
|
post_install_message:
|
41
43
|
rdoc_options:
|
42
44
|
- "--charset=UTF-8"
|