Skip to content

Commit d8d947f

Browse files
committed
Updated README.md to include headers option
1 parent bc5465c commit d8d947f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ grunt.initConfig({
3636
options: {
3737
url: 'http://example.com/template/123/?token=<%= config.apiKey %>',
3838
method: 'PUT',
39+
headers: {
40+
'Authorization': 'Token <%= your_token_here %>'
41+
},
3942
data: {
4043
someKey: 'some value'
4144
}
@@ -70,6 +73,12 @@ DefaultValue: `{}`
7073

7174
Any form data fields to be sent in addition to the file upload
7275

76+
#### options.headers
77+
Type: `Object`
78+
DefaultValue: `{}`
79+
80+
Headers to send along with your HTTP request. For example, a lot of API require the Authentication to be sent through the Headers.
81+
7382
#### src
7483
Type: `String`
7584
Default value: `''`
@@ -111,7 +120,7 @@ You should fork this repo, and issue a Pull Request with your proposed changes.
111120

112121
### Roadmap ideas
113122
For now the upload is limited to 1 file per target. This could change if I find a scenario needing it.
114-
Also, it is not possible to add additional payload (no custom data). A lot of API require the Authentication to be sent through the Headers, so this might be one of the next improvement.
123+
Also, it is not possible to add additional payload (no custom data).
115124

116125
## Release History
117126
- 0.1.2 - 2014-04-03: Updated Restler to latest (3.2.0) version.

0 commit comments

Comments
 (0)