3 ms·
It looks great. Postman always loses me because I usually only need simple requests and I have to go through a big structure. As a result, it only ever edits on
by adobrawy 3y ago
It looks great. Postman always loses me because I usually only need simple requests and I have to go through a big structure. As a result, it only ever edits one request over and over again, which I have configured correctly.
The key thing about Postman is that I was able to configure my own script to refresh the API token. For the internal API, we have a short-lived "access_token" token (~1 minute) and then a long-lived "refresh_token" (~1 day) based on the user's email address and password. When renewing the token, you receive information about its lifespan. You cannot create a new scratch token every time because you will be rate limited. I put all that logic in Postman hook script.
Making these HTTP requests in Curl – due to token refreshing – is painful.
Will Bruno support this use case?
- adolph 3y agocurl + shell $ eval $(stat -s refresh_token); #set some stat vars, will use change time st_ctime $ if [ $(expr $(date '+%s') - $st_ctime) > 86400 ]; then rm refresh_token; fi $ if [ ! -f refresh_token ]; then ./get_refresh_token.sh; fi
- majkinetor 3y agoSee my script here: https://news.ycombinator.com/item?id=39655266 https://news.ycombinator.com/item?id=39655266