http_utilities 1.3.9 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/http_utilities.gemspec +1 -1
- data/lib/http_utilities/http/client.rb +9 -1
- data/lib/http_utilities.rb +1 -1
- 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: 7ec3568fe8842b8251a6826f634deed1ffaa978ca957619edb9b378313bcc5ad
|
4
|
+
data.tar.gz: 2fbe2d6b0426b93dd2c1101dfd57c586fb9226aea4f1069e053957771dd8fab7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b3684b837c8710a28b5d507b18c5eb35895f0b3351dd8090ea56886ff4fd09d6b70c4ac27c42950284cb4006c1c181843e2bf5154f21c62c1ae7c552bb9ee14
|
7
|
+
data.tar.gz: b353a50e2ed40035fff0fc2d05f5c0f230e8f476aeeac34612d9b8ac6cb8cb373df3241207014bfe3b597850640f99cbefa850cd5d02d77095754161e0fcdf5b
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.4.0
|
data/http_utilities.gemspec
CHANGED
@@ -3,7 +3,7 @@ Gem::Specification.new do |s|
|
|
3
3
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5") if s.respond_to? :required_rubygems_version=
|
4
4
|
|
5
5
|
s.name = "http_utilities"
|
6
|
-
s.version = "1.
|
6
|
+
s.version = "1.4.0"
|
7
7
|
|
8
8
|
s.authors = ["Sebastian Johnsson"]
|
9
9
|
s.description = "Wrapper for Faraday with additional functionality"
|
@@ -28,11 +28,19 @@ module HttpUtilities
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def post(url, data: nil, options: {}, client_options: {}, raise_exceptions: false, retries: 3)
|
31
|
+
update(url, action: :post, data: data, options: options, client_options: client_options, raise_exceptions: raise_exceptions, retries: retries)
|
32
|
+
end
|
33
|
+
|
34
|
+
def patch(url, data: nil, options: {}, client_options: {}, raise_exceptions: false, retries: 3)
|
35
|
+
update(url, action: :patch, data: data, options: options, client_options: client_options, raise_exceptions: raise_exceptions, retries: retries)
|
36
|
+
end
|
37
|
+
|
38
|
+
def update(url, action: :post, data: nil, options: {}, client_options: {}, raise_exceptions: false, retries: 3)
|
31
39
|
response = nil
|
32
40
|
|
33
41
|
begin
|
34
42
|
request = build_request(options: options, client_options: client_options)
|
35
|
-
response = request.interface.
|
43
|
+
response = request.interface.send(action, url, data)
|
36
44
|
response = HttpUtilities::Http::Response.new(response: response, request: request, options: options)
|
37
45
|
|
38
46
|
rescue *EXCEPTIONS => e
|
data/lib/http_utilities.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http_utilities
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Johnsson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|