parliament-ruby 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/parliament/request/base_request.rb +5 -3
- data/lib/parliament/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46b3e83963fc700db5e21218949bf9d69b78682e
|
4
|
+
data.tar.gz: 23ac86cccfc07c66569f1acf5d5d086911e542e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecd1985df2132b317c9829be1eaf631d7307d286967ce49161bc0963b53f2e2657e35dc7d124f67d2a76aaa65469cbc461782075013e5aa903eec81847bbcea2
|
7
|
+
data.tar.gz: 238fc6cddcc8c138ba82fb76bd5f54edc5f7a7f3e7c010a74a844dcbf8e6e9cd30b615113c11c43c871fe98cae17f18cae8ff9dca0b527489bd998daab95ee3e
|
@@ -128,9 +128,10 @@ module Parliament
|
|
128
128
|
#
|
129
129
|
# @param [Hash] params (optional) additional URI encoded form values to be added to the URI.
|
130
130
|
# @param [String] body (optional) body of the post request.
|
131
|
+
# @param [Integer] timeout (optional) a Net::HTTP.read_timeout value passed suring the post.
|
131
132
|
#
|
132
133
|
# @return [Parliament::Response::BaseResponse] a Parliament::Response::BaseResponse object containing all of the data returned from the URL.
|
133
|
-
def post(params: nil, body: nil)
|
134
|
+
def post(params: nil, body: nil, timeout: 60)
|
134
135
|
@query_params = @query_params.merge(params) unless params.nil?
|
135
136
|
|
136
137
|
endpoint_uri = URI.parse(query_url)
|
@@ -138,10 +139,11 @@ module Parliament
|
|
138
139
|
|
139
140
|
http = Net::HTTP.new(endpoint_uri.host, endpoint_uri.port)
|
140
141
|
http.use_ssl = true if endpoint_uri.scheme == 'https'
|
142
|
+
http.read_timeout = timeout
|
141
143
|
|
142
144
|
request = Net::HTTP::Post.new(
|
143
|
-
|
144
|
-
|
145
|
+
endpoint_uri.request_uri,
|
146
|
+
'Content-Type' => 'application/json'
|
145
147
|
)
|
146
148
|
|
147
149
|
add_headers(request)
|
data/lib/parliament/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parliament-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Rayner
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|