cft_smartcloud 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +4 -0
- data/Rakefile +3 -3
- data/VERSION +1 -1
- data/bin/cft_smartcloud +37 -0
- data/cft_smartcloud.gemspec +88 -7
- data/lib/smartcloud.rb +12 -2
- data/lib/smartcloud_logger.rb +1 -1
- data/rdoc/classes/ConfigTable/BoolItem.html +172 -0
- data/rdoc/classes/ConfigTable/ExecItem.html +252 -0
- data/rdoc/classes/ConfigTable/Item.html +308 -0
- data/rdoc/classes/ConfigTable/MetaConfigEnvironment.html +445 -0
- data/rdoc/classes/ConfigTable/PackageSelectionItem.html +188 -0
- data/rdoc/classes/ConfigTable/PathItem.html +148 -0
- data/rdoc/classes/ConfigTable/ProgramItem.html +148 -0
- data/rdoc/classes/ConfigTable/SelectItem.html +175 -0
- data/rdoc/classes/ConfigTable.html +724 -0
- data/rdoc/classes/Enumerable.html +157 -0
- data/rdoc/classes/Errno/ENOTEMPTY.html +111 -0
- data/rdoc/classes/Errno.html +111 -0
- data/rdoc/classes/File.html +197 -0
- data/rdoc/classes/FileOperations.html +600 -0
- data/rdoc/classes/Hash.html +163 -0
- data/rdoc/classes/HookScriptAPI.html +413 -0
- data/rdoc/classes/IBMSmartCloud.html +1484 -0
- data/rdoc/classes/Installer/Shebang.html +245 -0
- data/rdoc/classes/Installer.html +1660 -0
- data/rdoc/classes/MIME/InvalidContentType.html +119 -0
- data/rdoc/classes/MIME/Type.html +1366 -0
- data/rdoc/classes/MIME/Types.html +643 -0
- data/rdoc/classes/MIME.html +124 -0
- data/rdoc/classes/MockSmartCloud.html +376 -0
- data/rdoc/classes/Net/HTTP.html +164 -0
- data/rdoc/classes/Net.html +122 -0
- data/rdoc/classes/RestClient/AbstractResponse.html +417 -0
- data/rdoc/classes/RestClient/Exception.html +305 -0
- data/rdoc/classes/RestClient/ExceptionWithResponse.html +119 -0
- data/rdoc/classes/RestClient/Exceptions.html +130 -0
- data/rdoc/classes/RestClient/MaxRedirectsReached.html +113 -0
- data/rdoc/classes/RestClient/Payload/Base.html +422 -0
- data/rdoc/classes/RestClient/Payload/Multipart.html +372 -0
- data/rdoc/classes/RestClient/Payload/Streamed.html +191 -0
- data/rdoc/classes/RestClient/Payload/UrlEncoded.html +202 -0
- data/rdoc/classes/RestClient/Payload.html +192 -0
- data/rdoc/classes/RestClient/RawResponse.html +236 -0
- data/rdoc/classes/RestClient/Redirect.html +168 -0
- data/rdoc/classes/RestClient/Request.html +950 -0
- data/rdoc/classes/RestClient/RequestFailed.html +178 -0
- data/rdoc/classes/RestClient/Resource.html +607 -0
- data/rdoc/classes/RestClient/Response.html +208 -0
- data/rdoc/classes/RestClient/ResponseForException.html +152 -0
- data/rdoc/classes/RestClient/SSLCertificateNotVerified.html +149 -0
- data/rdoc/classes/RestClient/ServerBrokeConnection.html +157 -0
- data/rdoc/classes/RestClient.html +737 -0
- data/rdoc/classes/SetupError.html +111 -0
- data/rdoc/classes/SmartcloudLogger.html +162 -0
- data/rdoc/classes/TestMIME.html +109 -0
- data/rdoc/classes/ToplevelInstaller.html +987 -0
- data/rdoc/classes/ToplevelInstallerMulti.html +593 -0
- data/rdoc/classes/XmlSimple/Cache.html +372 -0
- data/rdoc/classes/XmlSimple.html +475 -0
- data/rdoc/created.rid +1 -0
- data/rdoc/files/README_rdoc.html +198 -0
- data/rdoc/files/lib/hash_fix_rb.html +115 -0
- data/rdoc/files/lib/mime-types-1_16/lib/mime/types_rb.html +107 -0
- data/rdoc/files/lib/mime-types-1_16/setup_rb.html +157 -0
- data/rdoc/files/lib/mime-types-1_16/test/test_mime_type_rb.html +109 -0
- data/rdoc/files/lib/mime-types-1_16/test/test_mime_types_rb.html +109 -0
- data/rdoc/files/lib/mock_smartcloud_rb.html +115 -0
- data/rdoc/files/lib/rest-client-1_6_3/lib/rest-client_rb.html +107 -0
- data/rdoc/files/lib/rest-client-1_6_3/lib/rest_client_rb.html +108 -0
- data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/abstract_response_rb.html +108 -0
- data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/exceptions_rb.html +101 -0
- data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/net_http_ext_rb.html +113 -0
- data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/payload_rb.html +110 -0
- data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/raw_response_rb.html +101 -0
- data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/request_rb.html +110 -0
- data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/resource_rb.html +101 -0
- data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/response_rb.html +101 -0
- data/rdoc/files/lib/rest-client-1_6_3/lib/restclient_rb.html +111 -0
- data/rdoc/files/lib/restclient_fix_rb.html +115 -0
- data/rdoc/files/lib/smartcloud_logger_rb.html +115 -0
- data/rdoc/files/lib/smartcloud_rb.html +143 -0
- data/rdoc/files/lib/xml-simple-1_0_12/lib/xmlsimple_rb.html +124 -0
- data/rdoc/fr_class_index.html +79 -0
- data/rdoc/fr_file_index.html +48 -0
- data/rdoc/fr_method_index.html +441 -0
- data/rdoc/index.html +26 -0
- data/rdoc/rdoc-style.css +208 -0
- metadata +90 -6
|
@@ -0,0 +1,607 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>Class: RestClient::Resource</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="classHeader">
|
|
50
|
+
<table class="header-table">
|
|
51
|
+
<tr class="top-aligned-row">
|
|
52
|
+
<td><strong>Class</strong></td>
|
|
53
|
+
<td class="class-name-in-header">RestClient::Resource</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../../files/lib/rest-client-1_6_3/lib/restclient/resource_rb.html">
|
|
59
|
+
lib/rest-client-1.6.3/lib/restclient/resource.rb
|
|
60
|
+
</a>
|
|
61
|
+
<br />
|
|
62
|
+
</td>
|
|
63
|
+
</tr>
|
|
64
|
+
|
|
65
|
+
<tr class="top-aligned-row">
|
|
66
|
+
<td><strong>Parent:</strong></td>
|
|
67
|
+
<td>
|
|
68
|
+
Object
|
|
69
|
+
</td>
|
|
70
|
+
</tr>
|
|
71
|
+
</table>
|
|
72
|
+
</div>
|
|
73
|
+
<!-- banner header -->
|
|
74
|
+
|
|
75
|
+
<div id="bodyContent">
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
<div id="contextContent">
|
|
80
|
+
|
|
81
|
+
<div id="description">
|
|
82
|
+
<p>
|
|
83
|
+
A class that can be instantiated for access to a RESTful resource,
|
|
84
|
+
including authentication.
|
|
85
|
+
</p>
|
|
86
|
+
<p>
|
|
87
|
+
Example:
|
|
88
|
+
</p>
|
|
89
|
+
<pre>
|
|
90
|
+
resource = RestClient::Resource.new('http://some/resource')
|
|
91
|
+
jpg = resource.get(:accept => 'image/jpg')
|
|
92
|
+
</pre>
|
|
93
|
+
<p>
|
|
94
|
+
With HTTP basic authentication:
|
|
95
|
+
</p>
|
|
96
|
+
<pre>
|
|
97
|
+
resource = RestClient::Resource.new('http://protected/resource', :user => 'user', :password => 'password')
|
|
98
|
+
resource.delete
|
|
99
|
+
</pre>
|
|
100
|
+
<p>
|
|
101
|
+
With a <a href="Resource.html#M000334">timeout</a> (seconds):
|
|
102
|
+
</p>
|
|
103
|
+
<pre>
|
|
104
|
+
RestClient::Resource.new('http://slow', :timeout => 10)
|
|
105
|
+
</pre>
|
|
106
|
+
<p>
|
|
107
|
+
With an open <a href="Resource.html#M000334">timeout</a> (seconds):
|
|
108
|
+
</p>
|
|
109
|
+
<pre>
|
|
110
|
+
RestClient::Resource.new('http://behindfirewall', :open_timeout => 10)
|
|
111
|
+
</pre>
|
|
112
|
+
<p>
|
|
113
|
+
You can also use resources to share common <a
|
|
114
|
+
href="Resource.html#M000333">headers</a>. For <a
|
|
115
|
+
href="Resource.html#M000333">headers</a> keys, symbols are converted to
|
|
116
|
+
strings. Example:
|
|
117
|
+
</p>
|
|
118
|
+
<pre>
|
|
119
|
+
resource = RestClient::Resource.new('http://some/resource', :headers => { :client_version => 1 })
|
|
120
|
+
</pre>
|
|
121
|
+
<p>
|
|
122
|
+
This header will be transported as X-Client-Version (notice the X prefix,
|
|
123
|
+
capitalization and hyphens)
|
|
124
|
+
</p>
|
|
125
|
+
<p>
|
|
126
|
+
Use the [] syntax to allocate subresources:
|
|
127
|
+
</p>
|
|
128
|
+
<pre>
|
|
129
|
+
site = RestClient::Resource.new('http://example.com', :user => 'adam', :password => 'mypasswd')
|
|
130
|
+
site['posts/1/comments'].post 'Good article.', :content_type => 'text/plain'
|
|
131
|
+
</pre>
|
|
132
|
+
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
<div id="method-list">
|
|
139
|
+
<h3 class="section-bar">Methods</h3>
|
|
140
|
+
|
|
141
|
+
<div class="name-list">
|
|
142
|
+
<a href="#M000336">[]</a>
|
|
143
|
+
<a href="#M000329">delete</a>
|
|
144
|
+
<a href="#M000324">get</a>
|
|
145
|
+
<a href="#M000325">head</a>
|
|
146
|
+
<a href="#M000333">headers</a>
|
|
147
|
+
<a href="#M000323">new</a>
|
|
148
|
+
<a href="#M000335">open_timeout</a>
|
|
149
|
+
<a href="#M000332">password</a>
|
|
150
|
+
<a href="#M000328">patch</a>
|
|
151
|
+
<a href="#M000326">post</a>
|
|
152
|
+
<a href="#M000327">put</a>
|
|
153
|
+
<a href="#M000334">timeout</a>
|
|
154
|
+
<a href="#M000330">to_s</a>
|
|
155
|
+
<a href="#M000331">user</a>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
|
|
159
|
+
</div>
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
<!-- if includes -->
|
|
163
|
+
|
|
164
|
+
<div id="section">
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
<div id="attribute-list">
|
|
171
|
+
<h3 class="section-bar">Attributes</h3>
|
|
172
|
+
|
|
173
|
+
<div class="name-list">
|
|
174
|
+
<table>
|
|
175
|
+
<tr class="top-aligned-row context-row">
|
|
176
|
+
<td class="context-item-name">block</td>
|
|
177
|
+
<td class="context-item-value"> [R] </td>
|
|
178
|
+
<td class="context-item-desc"></td>
|
|
179
|
+
</tr>
|
|
180
|
+
<tr class="top-aligned-row context-row">
|
|
181
|
+
<td class="context-item-name">options</td>
|
|
182
|
+
<td class="context-item-value"> [R] </td>
|
|
183
|
+
<td class="context-item-desc"></td>
|
|
184
|
+
</tr>
|
|
185
|
+
<tr class="top-aligned-row context-row">
|
|
186
|
+
<td class="context-item-name">url</td>
|
|
187
|
+
<td class="context-item-value"> [R] </td>
|
|
188
|
+
<td class="context-item-desc"></td>
|
|
189
|
+
</tr>
|
|
190
|
+
</table>
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
<!-- if method_list -->
|
|
197
|
+
<div id="methods">
|
|
198
|
+
<h3 class="section-bar">Public Class methods</h3>
|
|
199
|
+
|
|
200
|
+
<div id="method-M000323" class="method-detail">
|
|
201
|
+
<a name="M000323"></a>
|
|
202
|
+
|
|
203
|
+
<div class="method-heading">
|
|
204
|
+
<a href="#M000323" class="method-signature">
|
|
205
|
+
<span class="method-name">new</span><span class="method-args">(url, options={}, backwards_compatibility=nil, &block)</span>
|
|
206
|
+
</a>
|
|
207
|
+
</div>
|
|
208
|
+
|
|
209
|
+
<div class="method-description">
|
|
210
|
+
<p><a class="source-toggle" href="#"
|
|
211
|
+
onclick="toggleCode('M000323-source');return false;">[Source]</a></p>
|
|
212
|
+
<div class="method-source-code" id="M000323-source">
|
|
213
|
+
<pre>
|
|
214
|
+
<span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/resource.rb, line 39</span>
|
|
215
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">options</span>={}, <span class="ruby-identifier">backwards_compatibility</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
216
|
+
<span class="ruby-ivar">@url</span> = <span class="ruby-identifier">url</span>
|
|
217
|
+
<span class="ruby-ivar">@block</span> = <span class="ruby-identifier">block</span>
|
|
218
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Hash</span>
|
|
219
|
+
<span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
|
|
220
|
+
<span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># compatibility with previous versions</span>
|
|
221
|
+
<span class="ruby-ivar">@options</span> = { <span class="ruby-identifier">:user</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">options</span>, <span class="ruby-identifier">:password</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">backwards_compatibility</span> }
|
|
222
|
+
<span class="ruby-keyword kw">end</span>
|
|
223
|
+
<span class="ruby-keyword kw">end</span>
|
|
224
|
+
</pre>
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
|
|
229
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
|
230
|
+
|
|
231
|
+
<div id="method-M000336" class="method-detail">
|
|
232
|
+
<a name="M000336"></a>
|
|
233
|
+
|
|
234
|
+
<div class="method-heading">
|
|
235
|
+
<a href="#M000336" class="method-signature">
|
|
236
|
+
<span class="method-name">[]</span><span class="method-args">(suburl, &new_block)</span>
|
|
237
|
+
</a>
|
|
238
|
+
</div>
|
|
239
|
+
|
|
240
|
+
<div class="method-description">
|
|
241
|
+
<p>
|
|
242
|
+
Construct a subresource, preserving authentication.
|
|
243
|
+
</p>
|
|
244
|
+
<p>
|
|
245
|
+
Example:
|
|
246
|
+
</p>
|
|
247
|
+
<pre>
|
|
248
|
+
site = RestClient::Resource.new('http://example.com', 'adam', 'mypasswd')
|
|
249
|
+
site['posts/1/comments'].post 'Good article.', :content_type => 'text/plain'
|
|
250
|
+
</pre>
|
|
251
|
+
<p>
|
|
252
|
+
This is especially useful if you wish to define your site in one place and
|
|
253
|
+
call it in multiple locations:
|
|
254
|
+
</p>
|
|
255
|
+
<pre>
|
|
256
|
+
def orders
|
|
257
|
+
RestClient::Resource.new('http://example.com/orders', 'admin', 'mypasswd')
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
orders.get # GET http://example.com/orders
|
|
261
|
+
orders['1'].get # GET http://example.com/orders/1
|
|
262
|
+
orders['1/items'].delete # DELETE http://example.com/orders/1/items
|
|
263
|
+
</pre>
|
|
264
|
+
<p>
|
|
265
|
+
Nest resources as far as you want:
|
|
266
|
+
</p>
|
|
267
|
+
<pre>
|
|
268
|
+
site = RestClient::Resource.new('http://example.com')
|
|
269
|
+
posts = site['posts']
|
|
270
|
+
first_post = posts['1']
|
|
271
|
+
comments = first_post['comments']
|
|
272
|
+
comments.post 'Hello', :content_type => 'text/plain'
|
|
273
|
+
</pre>
|
|
274
|
+
<p><a class="source-toggle" href="#"
|
|
275
|
+
onclick="toggleCode('M000336-source');return false;">[Source]</a></p>
|
|
276
|
+
<div class="method-source-code" id="M000336-source">
|
|
277
|
+
<pre>
|
|
278
|
+
<span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/resource.rb, line 150</span>
|
|
279
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">suburl</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">new_block</span>)
|
|
280
|
+
<span class="ruby-keyword kw">case</span>
|
|
281
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">block_given?</span> <span class="ruby-keyword kw">then</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">concat_urls</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">suburl</span>), <span class="ruby-identifier">options</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">new_block</span>)
|
|
282
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">block</span> <span class="ruby-keyword kw">then</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">concat_urls</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">suburl</span>), <span class="ruby-identifier">options</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
283
|
+
<span class="ruby-keyword kw">else</span>
|
|
284
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">concat_urls</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">suburl</span>), <span class="ruby-identifier">options</span>)
|
|
285
|
+
<span class="ruby-keyword kw">end</span>
|
|
286
|
+
<span class="ruby-keyword kw">end</span>
|
|
287
|
+
</pre>
|
|
288
|
+
</div>
|
|
289
|
+
</div>
|
|
290
|
+
</div>
|
|
291
|
+
|
|
292
|
+
<div id="method-M000329" class="method-detail">
|
|
293
|
+
<a name="M000329"></a>
|
|
294
|
+
|
|
295
|
+
<div class="method-heading">
|
|
296
|
+
<a href="#M000329" class="method-signature">
|
|
297
|
+
<span class="method-name">delete</span><span class="method-args">(additional_headers={}, &block)</span>
|
|
298
|
+
</a>
|
|
299
|
+
</div>
|
|
300
|
+
|
|
301
|
+
<div class="method-description">
|
|
302
|
+
<p><a class="source-toggle" href="#"
|
|
303
|
+
onclick="toggleCode('M000329-source');return false;">[Source]</a></p>
|
|
304
|
+
<div class="method-source-code" id="M000329-source">
|
|
305
|
+
<pre>
|
|
306
|
+
<span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/resource.rb, line 92</span>
|
|
307
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">additional_headers</span>={}, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
308
|
+
<span class="ruby-identifier">headers</span> = (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:headers</span>] <span class="ruby-operator">||</span> {}).<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">additional_headers</span>)
|
|
309
|
+
<span class="ruby-constant">Request</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(
|
|
310
|
+
<span class="ruby-identifier">:method</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:delete</span>,
|
|
311
|
+
<span class="ruby-identifier">:url</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">url</span>,
|
|
312
|
+
<span class="ruby-identifier">:headers</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">headers</span>), <span class="ruby-operator">&</span>(<span class="ruby-identifier">block</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@block</span>))
|
|
313
|
+
<span class="ruby-keyword kw">end</span>
|
|
314
|
+
</pre>
|
|
315
|
+
</div>
|
|
316
|
+
</div>
|
|
317
|
+
</div>
|
|
318
|
+
|
|
319
|
+
<div id="method-M000324" class="method-detail">
|
|
320
|
+
<a name="M000324"></a>
|
|
321
|
+
|
|
322
|
+
<div class="method-heading">
|
|
323
|
+
<a href="#M000324" class="method-signature">
|
|
324
|
+
<span class="method-name">get</span><span class="method-args">(additional_headers={}, &block)</span>
|
|
325
|
+
</a>
|
|
326
|
+
</div>
|
|
327
|
+
|
|
328
|
+
<div class="method-description">
|
|
329
|
+
<p><a class="source-toggle" href="#"
|
|
330
|
+
onclick="toggleCode('M000324-source');return false;">[Source]</a></p>
|
|
331
|
+
<div class="method-source-code" id="M000324-source">
|
|
332
|
+
<pre>
|
|
333
|
+
<span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/resource.rb, line 49</span>
|
|
334
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">additional_headers</span>={}, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
335
|
+
<span class="ruby-identifier">headers</span> = (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:headers</span>] <span class="ruby-operator">||</span> {}).<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">additional_headers</span>)
|
|
336
|
+
<span class="ruby-constant">Request</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(
|
|
337
|
+
<span class="ruby-identifier">:method</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:get</span>,
|
|
338
|
+
<span class="ruby-identifier">:url</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">url</span>,
|
|
339
|
+
<span class="ruby-identifier">:headers</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">headers</span>), <span class="ruby-operator">&</span>(<span class="ruby-identifier">block</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@block</span>))
|
|
340
|
+
<span class="ruby-keyword kw">end</span>
|
|
341
|
+
</pre>
|
|
342
|
+
</div>
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
|
|
346
|
+
<div id="method-M000325" class="method-detail">
|
|
347
|
+
<a name="M000325"></a>
|
|
348
|
+
|
|
349
|
+
<div class="method-heading">
|
|
350
|
+
<a href="#M000325" class="method-signature">
|
|
351
|
+
<span class="method-name">head</span><span class="method-args">(additional_headers={}, &block)</span>
|
|
352
|
+
</a>
|
|
353
|
+
</div>
|
|
354
|
+
|
|
355
|
+
<div class="method-description">
|
|
356
|
+
<p><a class="source-toggle" href="#"
|
|
357
|
+
onclick="toggleCode('M000325-source');return false;">[Source]</a></p>
|
|
358
|
+
<div class="method-source-code" id="M000325-source">
|
|
359
|
+
<pre>
|
|
360
|
+
<span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/resource.rb, line 57</span>
|
|
361
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">head</span>(<span class="ruby-identifier">additional_headers</span>={}, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
362
|
+
<span class="ruby-identifier">headers</span> = (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:headers</span>] <span class="ruby-operator">||</span> {}).<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">additional_headers</span>)
|
|
363
|
+
<span class="ruby-constant">Request</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(
|
|
364
|
+
<span class="ruby-identifier">:method</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:head</span>,
|
|
365
|
+
<span class="ruby-identifier">:url</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">url</span>,
|
|
366
|
+
<span class="ruby-identifier">:headers</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">headers</span>), <span class="ruby-operator">&</span>(<span class="ruby-identifier">block</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@block</span>))
|
|
367
|
+
<span class="ruby-keyword kw">end</span>
|
|
368
|
+
</pre>
|
|
369
|
+
</div>
|
|
370
|
+
</div>
|
|
371
|
+
</div>
|
|
372
|
+
|
|
373
|
+
<div id="method-M000333" class="method-detail">
|
|
374
|
+
<a name="M000333"></a>
|
|
375
|
+
|
|
376
|
+
<div class="method-heading">
|
|
377
|
+
<a href="#M000333" class="method-signature">
|
|
378
|
+
<span class="method-name">headers</span><span class="method-args">()</span>
|
|
379
|
+
</a>
|
|
380
|
+
</div>
|
|
381
|
+
|
|
382
|
+
<div class="method-description">
|
|
383
|
+
<p><a class="source-toggle" href="#"
|
|
384
|
+
onclick="toggleCode('M000333-source');return false;">[Source]</a></p>
|
|
385
|
+
<div class="method-source-code" id="M000333-source">
|
|
386
|
+
<pre>
|
|
387
|
+
<span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/resource.rb, line 112</span>
|
|
388
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">headers</span>
|
|
389
|
+
<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:headers</span>] <span class="ruby-operator">||</span> {}
|
|
390
|
+
<span class="ruby-keyword kw">end</span>
|
|
391
|
+
</pre>
|
|
392
|
+
</div>
|
|
393
|
+
</div>
|
|
394
|
+
</div>
|
|
395
|
+
|
|
396
|
+
<div id="method-M000335" class="method-detail">
|
|
397
|
+
<a name="M000335"></a>
|
|
398
|
+
|
|
399
|
+
<div class="method-heading">
|
|
400
|
+
<a href="#M000335" class="method-signature">
|
|
401
|
+
<span class="method-name">open_timeout</span><span class="method-args">()</span>
|
|
402
|
+
</a>
|
|
403
|
+
</div>
|
|
404
|
+
|
|
405
|
+
<div class="method-description">
|
|
406
|
+
<p><a class="source-toggle" href="#"
|
|
407
|
+
onclick="toggleCode('M000335-source');return false;">[Source]</a></p>
|
|
408
|
+
<div class="method-source-code" id="M000335-source">
|
|
409
|
+
<pre>
|
|
410
|
+
<span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/resource.rb, line 120</span>
|
|
411
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open_timeout</span>
|
|
412
|
+
<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:open_timeout</span>]
|
|
413
|
+
<span class="ruby-keyword kw">end</span>
|
|
414
|
+
</pre>
|
|
415
|
+
</div>
|
|
416
|
+
</div>
|
|
417
|
+
</div>
|
|
418
|
+
|
|
419
|
+
<div id="method-M000332" class="method-detail">
|
|
420
|
+
<a name="M000332"></a>
|
|
421
|
+
|
|
422
|
+
<div class="method-heading">
|
|
423
|
+
<a href="#M000332" class="method-signature">
|
|
424
|
+
<span class="method-name">password</span><span class="method-args">()</span>
|
|
425
|
+
</a>
|
|
426
|
+
</div>
|
|
427
|
+
|
|
428
|
+
<div class="method-description">
|
|
429
|
+
<p><a class="source-toggle" href="#"
|
|
430
|
+
onclick="toggleCode('M000332-source');return false;">[Source]</a></p>
|
|
431
|
+
<div class="method-source-code" id="M000332-source">
|
|
432
|
+
<pre>
|
|
433
|
+
<span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/resource.rb, line 108</span>
|
|
434
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">password</span>
|
|
435
|
+
<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:password</span>]
|
|
436
|
+
<span class="ruby-keyword kw">end</span>
|
|
437
|
+
</pre>
|
|
438
|
+
</div>
|
|
439
|
+
</div>
|
|
440
|
+
</div>
|
|
441
|
+
|
|
442
|
+
<div id="method-M000328" class="method-detail">
|
|
443
|
+
<a name="M000328"></a>
|
|
444
|
+
|
|
445
|
+
<div class="method-heading">
|
|
446
|
+
<a href="#M000328" class="method-signature">
|
|
447
|
+
<span class="method-name">patch</span><span class="method-args">(payload, additional_headers={}, &block)</span>
|
|
448
|
+
</a>
|
|
449
|
+
</div>
|
|
450
|
+
|
|
451
|
+
<div class="method-description">
|
|
452
|
+
<p><a class="source-toggle" href="#"
|
|
453
|
+
onclick="toggleCode('M000328-source');return false;">[Source]</a></p>
|
|
454
|
+
<div class="method-source-code" id="M000328-source">
|
|
455
|
+
<pre>
|
|
456
|
+
<span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/resource.rb, line 83</span>
|
|
457
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">patch</span>(<span class="ruby-identifier">payload</span>, <span class="ruby-identifier">additional_headers</span>={}, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
458
|
+
<span class="ruby-identifier">headers</span> = (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:headers</span>] <span class="ruby-operator">||</span> {}).<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">additional_headers</span>)
|
|
459
|
+
<span class="ruby-constant">Request</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(
|
|
460
|
+
<span class="ruby-identifier">:method</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:patch</span>,
|
|
461
|
+
<span class="ruby-identifier">:url</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">url</span>,
|
|
462
|
+
<span class="ruby-identifier">:payload</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">payload</span>,
|
|
463
|
+
<span class="ruby-identifier">:headers</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">headers</span>), <span class="ruby-operator">&</span>(<span class="ruby-identifier">block</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@block</span>))
|
|
464
|
+
<span class="ruby-keyword kw">end</span>
|
|
465
|
+
</pre>
|
|
466
|
+
</div>
|
|
467
|
+
</div>
|
|
468
|
+
</div>
|
|
469
|
+
|
|
470
|
+
<div id="method-M000326" class="method-detail">
|
|
471
|
+
<a name="M000326"></a>
|
|
472
|
+
|
|
473
|
+
<div class="method-heading">
|
|
474
|
+
<a href="#M000326" class="method-signature">
|
|
475
|
+
<span class="method-name">post</span><span class="method-args">(payload, additional_headers={}, &block)</span>
|
|
476
|
+
</a>
|
|
477
|
+
</div>
|
|
478
|
+
|
|
479
|
+
<div class="method-description">
|
|
480
|
+
<p><a class="source-toggle" href="#"
|
|
481
|
+
onclick="toggleCode('M000326-source');return false;">[Source]</a></p>
|
|
482
|
+
<div class="method-source-code" id="M000326-source">
|
|
483
|
+
<pre>
|
|
484
|
+
<span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/resource.rb, line 65</span>
|
|
485
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span>(<span class="ruby-identifier">payload</span>, <span class="ruby-identifier">additional_headers</span>={}, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
486
|
+
<span class="ruby-identifier">headers</span> = (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:headers</span>] <span class="ruby-operator">||</span> {}).<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">additional_headers</span>)
|
|
487
|
+
<span class="ruby-constant">Request</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(
|
|
488
|
+
<span class="ruby-identifier">:method</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:post</span>,
|
|
489
|
+
<span class="ruby-identifier">:url</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">url</span>,
|
|
490
|
+
<span class="ruby-identifier">:payload</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">payload</span>,
|
|
491
|
+
<span class="ruby-identifier">:headers</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">headers</span>), <span class="ruby-operator">&</span>(<span class="ruby-identifier">block</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@block</span>))
|
|
492
|
+
<span class="ruby-keyword kw">end</span>
|
|
493
|
+
</pre>
|
|
494
|
+
</div>
|
|
495
|
+
</div>
|
|
496
|
+
</div>
|
|
497
|
+
|
|
498
|
+
<div id="method-M000327" class="method-detail">
|
|
499
|
+
<a name="M000327"></a>
|
|
500
|
+
|
|
501
|
+
<div class="method-heading">
|
|
502
|
+
<a href="#M000327" class="method-signature">
|
|
503
|
+
<span class="method-name">put</span><span class="method-args">(payload, additional_headers={}, &block)</span>
|
|
504
|
+
</a>
|
|
505
|
+
</div>
|
|
506
|
+
|
|
507
|
+
<div class="method-description">
|
|
508
|
+
<p><a class="source-toggle" href="#"
|
|
509
|
+
onclick="toggleCode('M000327-source');return false;">[Source]</a></p>
|
|
510
|
+
<div class="method-source-code" id="M000327-source">
|
|
511
|
+
<pre>
|
|
512
|
+
<span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/resource.rb, line 74</span>
|
|
513
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put</span>(<span class="ruby-identifier">payload</span>, <span class="ruby-identifier">additional_headers</span>={}, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
514
|
+
<span class="ruby-identifier">headers</span> = (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:headers</span>] <span class="ruby-operator">||</span> {}).<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">additional_headers</span>)
|
|
515
|
+
<span class="ruby-constant">Request</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(
|
|
516
|
+
<span class="ruby-identifier">:method</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:put</span>,
|
|
517
|
+
<span class="ruby-identifier">:url</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">url</span>,
|
|
518
|
+
<span class="ruby-identifier">:payload</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">payload</span>,
|
|
519
|
+
<span class="ruby-identifier">:headers</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">headers</span>), <span class="ruby-operator">&</span>(<span class="ruby-identifier">block</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@block</span>))
|
|
520
|
+
<span class="ruby-keyword kw">end</span>
|
|
521
|
+
</pre>
|
|
522
|
+
</div>
|
|
523
|
+
</div>
|
|
524
|
+
</div>
|
|
525
|
+
|
|
526
|
+
<div id="method-M000334" class="method-detail">
|
|
527
|
+
<a name="M000334"></a>
|
|
528
|
+
|
|
529
|
+
<div class="method-heading">
|
|
530
|
+
<a href="#M000334" class="method-signature">
|
|
531
|
+
<span class="method-name">timeout</span><span class="method-args">()</span>
|
|
532
|
+
</a>
|
|
533
|
+
</div>
|
|
534
|
+
|
|
535
|
+
<div class="method-description">
|
|
536
|
+
<p><a class="source-toggle" href="#"
|
|
537
|
+
onclick="toggleCode('M000334-source');return false;">[Source]</a></p>
|
|
538
|
+
<div class="method-source-code" id="M000334-source">
|
|
539
|
+
<pre>
|
|
540
|
+
<span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/resource.rb, line 116</span>
|
|
541
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">timeout</span>
|
|
542
|
+
<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:timeout</span>]
|
|
543
|
+
<span class="ruby-keyword kw">end</span>
|
|
544
|
+
</pre>
|
|
545
|
+
</div>
|
|
546
|
+
</div>
|
|
547
|
+
</div>
|
|
548
|
+
|
|
549
|
+
<div id="method-M000330" class="method-detail">
|
|
550
|
+
<a name="M000330"></a>
|
|
551
|
+
|
|
552
|
+
<div class="method-heading">
|
|
553
|
+
<a href="#M000330" class="method-signature">
|
|
554
|
+
<span class="method-name">to_s</span><span class="method-args">()</span>
|
|
555
|
+
</a>
|
|
556
|
+
</div>
|
|
557
|
+
|
|
558
|
+
<div class="method-description">
|
|
559
|
+
<p><a class="source-toggle" href="#"
|
|
560
|
+
onclick="toggleCode('M000330-source');return false;">[Source]</a></p>
|
|
561
|
+
<div class="method-source-code" id="M000330-source">
|
|
562
|
+
<pre>
|
|
563
|
+
<span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/resource.rb, line 100</span>
|
|
564
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
|
565
|
+
<span class="ruby-identifier">url</span>
|
|
566
|
+
<span class="ruby-keyword kw">end</span>
|
|
567
|
+
</pre>
|
|
568
|
+
</div>
|
|
569
|
+
</div>
|
|
570
|
+
</div>
|
|
571
|
+
|
|
572
|
+
<div id="method-M000331" class="method-detail">
|
|
573
|
+
<a name="M000331"></a>
|
|
574
|
+
|
|
575
|
+
<div class="method-heading">
|
|
576
|
+
<a href="#M000331" class="method-signature">
|
|
577
|
+
<span class="method-name">user</span><span class="method-args">()</span>
|
|
578
|
+
</a>
|
|
579
|
+
</div>
|
|
580
|
+
|
|
581
|
+
<div class="method-description">
|
|
582
|
+
<p><a class="source-toggle" href="#"
|
|
583
|
+
onclick="toggleCode('M000331-source');return false;">[Source]</a></p>
|
|
584
|
+
<div class="method-source-code" id="M000331-source">
|
|
585
|
+
<pre>
|
|
586
|
+
<span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/resource.rb, line 104</span>
|
|
587
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">user</span>
|
|
588
|
+
<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:user</span>]
|
|
589
|
+
<span class="ruby-keyword kw">end</span>
|
|
590
|
+
</pre>
|
|
591
|
+
</div>
|
|
592
|
+
</div>
|
|
593
|
+
</div>
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
</div>
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
</div>
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
<div id="validator-badges">
|
|
603
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
604
|
+
</div>
|
|
605
|
+
|
|
606
|
+
</body>
|
|
607
|
+
</html>
|