dagger 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/lib/dagger.rb +1 -1
- data/lib/dagger/version.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20da33d8fe7bc80cdc39a6b3b9a50c586523e820
|
4
|
+
data.tar.gz: 61be2074cd53b573f0be6c9b68f1e89dcbfc3e78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ee5798c4af31804ef69fad96844bd0bb8f298502fd85460fc87806b98e744f1bee680e56e849f4ce3f76e1eea8691143bfb027bb428e85523e753ceb6a6cfd5
|
7
|
+
data.tar.gz: 9d0e3ed3c7256028b9fdc68921bdbb16eaf1e66edb0c8eb5402f9a614f7e3039e857a34d004b257569b512b8b666cecf984c25a6d96338f0484bdc22c29b10cd
|
data/README.md
CHANGED
@@ -41,6 +41,13 @@ puts resp.data # => { result: 'GREAT SUCCESS!' }
|
|
41
41
|
|
42
42
|
Same syntax applies for `put`, `patch` and `delete` requests.
|
43
43
|
|
44
|
+
## `request(method, url, [params], [options])`
|
45
|
+
|
46
|
+
```rb
|
47
|
+
resp = Dagger.request(:put, 'https://api.server.com', { foo: 'bar' }, { follow: 10 })
|
48
|
+
puts resp.headers # { 'Content-Type' => 'application/json', ... }
|
49
|
+
```
|
50
|
+
|
44
51
|
# Options
|
45
52
|
|
46
53
|
These are all the available options.
|
data/lib/dagger.rb
CHANGED
@@ -49,7 +49,7 @@ module Dagger
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def self.request(method, url, params = {}, options = {})
|
52
|
-
return get(url, options) if method.to_s.downcase == 'get'
|
52
|
+
return get(url, params, options) if method.to_s.downcase == 'get'
|
53
53
|
request(method.to_s.downcase, url, params, options)
|
54
54
|
end
|
55
55
|
|
data/lib/dagger/version.rb
CHANGED