Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If-None-Match Header config saved my day #71

Open
mddanishyusuf opened this issue Apr 30, 2019 · 0 comments
Open

If-None-Match Header config saved my day #71

mddanishyusuf opened this issue Apr 30, 2019 · 0 comments
Assignees
Labels
coding coolhack This trick is cool dailyhack This issue belongs to dailyhack.xyz javascript

Comments

@mddanishyusuf
Copy link
Owner

I'm building an small project with GitHub APIs and by default this is the config Cache-Control: public, max-age=60, s-maxage=60

Means GitHub APIs will be cache for next 60 sec of the call. I can't wait for that So, I google to find a solution and I found this https://github.com/octokit/rest.js/issues/890#issuecomment-392193948

Just use a basic config 'If-None-Match': '' in header and that's all.

Like this.

axios.get(url, {header: {'If-None-Match': ''}})

@mddanishyusuf mddanishyusuf changed the title If-None-Match Header saved my day If-None-Match Header config saved my day Apr 30, 2019
@mddanishyusuf mddanishyusuf self-assigned this Apr 30, 2019
@mddanishyusuf mddanishyusuf added coding coolhack This trick is cool dailyhack This issue belongs to dailyhack.xyz javascript labels Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coding coolhack This trick is cool dailyhack This issue belongs to dailyhack.xyz javascript
Projects
None yet
Development

No branches or pull requests

1 participant