Skip to content

Commit e59f125

Browse files
authored
Merge pull request #33 from githubocto/ia/authorization-header
feat: support authorization header for http endpoints
2 parents 5d978df + 93da886 commit e59f125

9 files changed

Lines changed: 241159 additions & 244313 deletions

File tree

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,21 @@ A URL from which to fetch data. Specifying this input puts Flat into `http` mode
8989

9090
This can be any endpoint: a json, csv, png, zip, xlsx, etc.
9191

92+
#### `authorization` (optional)
93+
94+
A string used for authorizing the HTTP request. The value of this field is passed in as a header w/ the `authorization` key.
95+
96+
For example, if this field is set to `Bearer abc123` then the following header is sent with each request:
97+
98+
```json
99+
{
100+
"Authorization": "Bearer abc123"
101+
}
102+
```
103+
104+
And in the action yaml:
105+
`authorization: 'Bearer abc123'`
106+
92107
#### `downloaded_filename`
93108

94109
The name of the file to store data fetched by Flat.

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ inputs:
88
http_url:
99
description: 'A URL containing data to fetch.'
1010
required: false
11+
authorization:
12+
description: 'A string to send as a header for authorizing API requests.'
13+
required: false
1114
mask:
1215
description: 'A string array of secrets to strip from the http_url or a string boolean'
1316
required: false

dist/LICENSE

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ MIT
1515

1616
@actions/io
1717
MIT
18+
The MIT License (MIT)
19+
20+
Copyright 2019 GitHub
21+
22+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
23+
24+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
25+
26+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1827

1928
@azure/ms-rest-azure-env
2029
MIT
@@ -3091,7 +3100,7 @@ pg
30913100
MIT
30923101
MIT License
30933102

3094-
Copyright (c) 2010 - 2020 Brian Carlson
3103+
Copyright (c) 2010 - 2021 Brian Carlson
30953104

30963105
Permission is hereby granted, free of charge, to any person obtaining a copy
30973106
of this software and associated documentation files (the "Software"), to deal
@@ -3182,7 +3191,7 @@ pg-protocol
31823191
MIT
31833192
MIT License
31843193

3185-
Copyright (c) 2010 - 2020 Brian Carlson
3194+
Copyright (c) 2010 - 2021 Brian Carlson
31863195

31873196
Permission is hereby granted, free of charge, to any person obtaining a copy
31883197
of this software and associated documentation files (the "Software"), to deal
@@ -4199,8 +4208,7 @@ MIT
41994208

42004209
underscore
42014210
MIT
4202-
Copyright (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative
4203-
Reporters & Editors
4211+
Copyright (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
42044212

42054213
Permission is hereby granted, free of charge, to any person
42064214
obtaining a copy of this software and associated documentation

0 commit comments

Comments
 (0)