request_via 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -7
- data/lib/request_via.rb +1 -1
- data/lib/request_via/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: 7c67800e3bcf05f1982183f497a923afbf94791d
|
4
|
+
data.tar.gz: f98306baddcf0cc8683709909d53b654500dfdb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a52554da135bdd9c7323580edff075a5592587ed5523fcd4df23a7f1a6c0e22737aa9f86712ca7374f474f1ae362b314399ad41f28a46af14d095c2487fb42fe
|
7
|
+
data.tar.gz: d97fb6aaaf7c7430e6cb514a480fcf5452a97bac438e40fa9c95b084ec0d5a5b3f6d025f8f128acf90a5fb27222f6f1c8e22f373691220620e7b31a782dd376e
|
data/README.md
CHANGED
@@ -53,7 +53,7 @@ Or install it yourself as:
|
|
53
53
|
|
54
54
|
## Usage
|
55
55
|
|
56
|
-
Making a GET request
|
56
|
+
Making a HTTP GET request
|
57
57
|
```ruby
|
58
58
|
# Use http:// as the protocol when there is no one defined.
|
59
59
|
RequestVia::Get.call('example.com')
|
@@ -119,14 +119,11 @@ client = RequestVia::Client.('https://example.com')
|
|
119
119
|
client.get # same of client.get('/')
|
120
120
|
|
121
121
|
# Supported arguments: params:, headers:
|
122
|
-
client.get(
|
122
|
+
client.get(params: { a: 1 }, headers: { 'Header-Name' => 'Header-Value' })
|
123
123
|
|
124
|
-
client.
|
124
|
+
client.get('foo', params: { a: 1 })
|
125
125
|
|
126
|
-
|
127
|
-
RequestVia::Client.('example.com/foo/bar', port: 3000,
|
128
|
-
open_timeout: 10,
|
129
|
-
read_timeout: 100)
|
126
|
+
client.get('/bar', headers: { 'User-Agent' => 'REST Example' })
|
130
127
|
|
131
128
|
# Supported HTTP methods:
|
132
129
|
# client.get
|
@@ -137,6 +134,11 @@ RequestVia::Client.('example.com/foo/bar', port: 3000,
|
|
137
134
|
# client.options
|
138
135
|
# client.trace
|
139
136
|
# client.patch
|
137
|
+
|
138
|
+
# Supported options
|
139
|
+
RequestVia::Client.('example.com/foo/bar', port: 3000,
|
140
|
+
open_timeout: 10,
|
141
|
+
read_timeout: 100)
|
140
142
|
```
|
141
143
|
|
142
144
|
## Development
|
data/lib/request_via.rb
CHANGED
data/lib/request_via/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: request_via
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Serradura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|