Skip to content

Commit

Permalink
fix: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Irene Alvarado committed Jul 22, 2021
1 parent 9a17f4e commit 40dfcf4
Show file tree
Hide file tree
Showing 5 changed files with 241,128 additions and 244,299 deletions.
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,29 @@ For example, if this field is set to `Bearer abc123` then the following header i
}
```

And in the action yaml:
`authorization: 'Bearer abc123'`
#### `axios_config` (optional)

Under the hood, the `http` backend uses [Axios](https://github.com/axios/axios) for data fetching. By default, Flat assumes you're interested in using the `GET` method to fetch data, but if you'd like to `POST` (e.g., sending a GraphQL query), the `axios_config` option allows you to override this behavior.

Specifically, the `axios_config` parameter should reflect a relative path to a `.json` file in your repository. This JSON file should mirror the shape of [Axios' request config parameters](https://github.com/axios/axios#request-config), with a few notable exceptions.

- `url` and `baseURL` will both be ignored, as the `http_url` specified above will take precedence.
- `headers` will be merged in with the authorization header described by the `authorization` parameter above. Please do not put secret keys here, as they will be stored in plain text!
- All `function` parameters will be ignored (e.g., `transformRequest`).
- The response type is always set to `responseType: 'stream'` in the background.
An example `axios_config` might look thusly if you were interested in hitting GitHub's GraphQL API ([here is a demo](https://github.com/githubocto/flat-demo-graphql)) 👇

```json
{
"method": "post",
"data": {
"query": "query { repository(owner:\"octocat\", name:\"Hello-World\") { issues(last:20, states:CLOSED) { edges { node { title url labels(first:5) { edges { node { name } } } } } } } }"
}
}
```

We advise escaping double quotes like `\"` in your JSON file.

#### `downloaded_filename`

Expand Down
16 changes: 12 additions & 4 deletions dist/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ MIT

@actions/io
MIT
The MIT License (MIT)

Copyright 2019 GitHub

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:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

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.

@azure/ms-rest-azure-env
MIT
Expand Down Expand Up @@ -3091,7 +3100,7 @@ pg
MIT
MIT License

Copyright (c) 2010 - 2020 Brian Carlson
Copyright (c) 2010 - 2021 Brian Carlson

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

Copyright (c) 2010 - 2020 Brian Carlson
Copyright (c) 2010 - 2021 Brian Carlson

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

underscore
MIT
Copyright (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative
Reporters & Editors
Copyright (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
Loading

0 comments on commit 40dfcf4

Please sign in to comment.