Skip to content

feat: support authorization header for http endpoints#33

Merged
irealva merged 9 commits into
mainfrom
ia/authorization-header
May 28, 2021
Merged

feat: support authorization header for http endpoints#33
irealva merged 9 commits into
mainfrom
ia/authorization-header

Conversation

@irealva

@irealva irealva commented May 28, 2021

Copy link
Copy Markdown
Contributor

Context
As users have brought up in #19, Flat did not support http endpoints that require authentication.

The original PR was submitted by @4lch4 in #22. I made tweaks to supply the authorization header only when it is not undefined and removed the version bump which is now outdated.

Fix
This PR adds an authorization param to the Flat action that requires a string and can be used to supply authentication information in the following way:

with:
    http_url: https://api.twitter.com/1.1/trends/place.json?id=1
    authorization: "Bearer ${{secrets.TWITTER_API_BEARER_TOKEN}}"
    downloaded_filename: twitter/trending-global-hashtags.json
    postprocess: ./src/processors/Twitter.ts

@irealva irealva linked an issue May 28, 2021 that may be closed by this pull request

@idan idan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor change needed in action.yml but otherwise LGTM!

Comment thread action.yml
@irealva
irealva merged commit e59f125 into main May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Performing HTTP Requests w/ Authorization

3 participants