You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 5.9/content-types/index.html
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -928,11 +928,11 @@ <h3 id="special-treatment-of-content-type-applicationjson">Special Treatment of
928
928
<h3id="special-treatment-of-content-type-multipartform-data">Special Treatment of Content Type <code>multipart/form-data</code></h3>
929
929
<p>Content type <code>multipart/form-data</code> is commonly used to transfer files to a server or to send multiple types of content in the request payload. If you specify a content type of <code>'multipart/form-data'</code>:</p>
930
930
<ul>
931
-
<li><code>Params</code> must be a namespace with named elements.</li>
931
+
<li><code>Params</code> must be a namespace with named elements. The names correspond to what would be the form <input> names were this request being sent from a browser.</li>
932
932
<li>Each element in <code>Params</code> consists of up to 3 elements:<ul>
933
-
<li>content - the data for the element, if sending a file this is the file name (see the section below) </li>
934
-
<li>type - the MIME content-type type for the element</li>
935
-
<li>filename - if content is to be saved as a file, this is the filename for the content</li>
933
+
<li><code>[1]</code>content - the data for the element, if sending a file this is the file name (see the section below) </li>
934
+
<li><code>[2]</code>type - the MIME content-type type for the element</li>
935
+
<li><code>[3]</code>filename - if content is to be saved as a file, this is the filename for the content</li>
936
936
</ul>
937
937
</li>
938
938
<li>To send a file, prefix the file name with either:<ul>
<sectionclass="print-page" id="request-settings"><p>Request-related settings are settings you use to specify attributes of the HTTP request that <code>HttpCommand</code> will process.</p>
<h3id="request-settings-command-or-method"><code>Command</code> or <code>Method</code></h3>
1683
1683
<table>
1684
1684
<tbody>
1685
1685
<tr>
1686
1686
<td>Description</td>
1687
-
<td>The case-insensitive HTTP command (method) for the request. <code>Command</code> is not limited to standard HTTP methods like GET, POST, PUT, HEAD, OPTIONS, and DELETE, but can be any string provided that the host has implemented support for it.</td>
1687
+
<td>The case-insensitive HTTP command (method) for the request. <code>Command</code>and <code>Method</code> are synomyms and either may be used. This setting is not limited to standard HTTP methods like GET, POST, PUT, HEAD, OPTIONS, and DELETE, but can be any string provided that the host has implemented support for it.</td>
<td><ul><li>The HTTP specification specifies that the HTTP method should be uppercase - <code>HttpCommand</code> will convert the method to uppercase prior to sending the request</li><li><code>Command</code> is the original setting used by <code>HttpCommand</code>. The <code>Method</code> synonym was introduced because "method" is the more common term in HTTP parlance</li><li><code>Command</code> and <code>Method</code> are kept in sync by <code>HttpCommand</code>; if you set both, the last one set will be what is used in the HTTP request.</li></ul></td>
<h3id="content-types-special-treatment-of-content-type-multipartform-data">Special Treatment of Content Type <code>multipart/form-data</code></h3>
3982
3986
<p>Content type <code>multipart/form-data</code> is commonly used to transfer files to a server or to send multiple types of content in the request payload. If you specify a content type of <code>'multipart/form-data'</code>:</p>
3983
3987
<ul>
3984
-
<li><code>Params</code> must be a namespace with named elements.</li>
3988
+
<li><code>Params</code> must be a namespace with named elements. The names correspond to what would be the form <input> names were this request being sent from a browser.</li>
3985
3989
<li>Each element in <code>Params</code> consists of up to 3 elements:<ul>
3986
-
<li>content - the data for the element, if sending a file this is the file name (see the section below) </li>
3987
-
<li>type - the MIME content-type type for the element</li>
3988
-
<li>filename - if content is to be saved as a file, this is the filename for the content</li>
3990
+
<li><code>[1]</code>content - the data for the element, if sending a file this is the file name (see the section below) </li>
3991
+
<li><code>[2]</code>type - the MIME content-type type for the element</li>
3992
+
<li><code>[3]</code>filename - if content is to be saved as a file, this is the filename for the content</li>
3989
3993
</ul>
3990
3994
</li>
3991
3995
<li>To send a file, prefix the file name with either:<ul>
<li>Allow <ahref="#shortcut-methods-getjson-issue-a-request-to-a-json-based-web-service"><code>GetJSON</code></a> to take a simple character vector URL.</li>
4273
+
<li>Enable uploading of file by specifying using the content of the file and its intended name, rather than reading a file from disk.</li>
Copy file name to clipboardExpand all lines: 5.9/release-notes/index.html
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1035,6 +1035,8 @@ <h1>Release Notes</h1>
1035
1035
<h2id="version-59">Version 5.9</h2>
1036
1036
<ul>
1037
1037
<li>Allow <ahref="../shortcut-methods/#getjson-issue-a-request-to-a-json-based-web-service"><code>GetJSON</code></a> to take a simple character vector URL.</li>
1038
+
<li>Enable uploading of file by specifying using the content of the file and its intended name, rather than reading a file from disk.</li>
<p>Request-related settings are settings you use to specify attributes of the HTTP request that <code>HttpCommand</code> will process.</p>
1146
1146
<h2id="instance-settings">Instance Settings</h2>
1147
-
<h3id="command"><code>Command</code></h3>
1147
+
<h3id="command-or-method"><code>Command</code> or <code>Method</code></h3>
1148
1148
<table>
1149
1149
<tbody>
1150
1150
<tr>
1151
1151
<td>Description</td>
1152
-
<td>The case-insensitive HTTP command (method) for the request. <code>Command</code> is not limited to standard HTTP methods like GET, POST, PUT, HEAD, OPTIONS, and DELETE, but can be any string provided that the host has implemented support for it.</td>
1152
+
<td>The case-insensitive HTTP command (method) for the request. <code>Command</code>and <code>Method</code> are synomyms and either may be used. This setting is not limited to standard HTTP methods like GET, POST, PUT, HEAD, OPTIONS, and DELETE, but can be any string provided that the host has implemented support for it.</td>
<td><ul><li>The HTTP specification specifies that the HTTP method should be uppercase - <code>HttpCommand</code> will convert the method to uppercase prior to sending the request</li><li><code>Command</code> is the original setting used by <code>HttpCommand</code>. The <code>Method</code> synonym was introduced because "method" is the more common term in HTTP parlance</li><li><code>Command</code> and <code>Method</code> are kept in sync by <code>HttpCommand</code>; if you set both, the last one set will be what is used in the HTTP request.</li></ul></td>
0 commit comments