Skip to content

Instantly share code, notes, and snippets.

@johnddias
Created August 8, 2017 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnddias/0a66539ef95ae69fe4aba42495f36120 to your computer and use it in GitHub Desktop.
Save johnddias/0a66539ef95ae69fe4aba42495f36120 to your computer and use it in GitHub Desktop.
Postman "Pre-Request" script for setting epoch environment var
var epoch = (new Date).getTime();
postman.setEnvironmentVariable("epoch", epoch);
var epochPrev24 = epoch - (24*60*60*1000)
postman.setEnvironmentVariable("epochPrev24", epochPrev24)
@praneethattuluri89
Copy link

Post man pre request script for setting 1 day earlier

@Abolfazl-MI
Copy link

I dont know how to use it in request body

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment