Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to give current time in POST request body

Tags:

rest

post

postman

I am trying to make a POST request to create a new resource. In the request body it needs time stamp that is current timestamp, how to add the timestamp , how to parameterize it to current timestamp?

like image 715
NRM Avatar asked Mar 06 '23 23:03

NRM


1 Answers

If it's a just timestamp you need, just add {{$timestamp}} to the request body as the value.

This would give you a Unix timestamp but if you want to use a specific format - you can use moment to do this.

How do I format {{$timestamp}} as MM/DD/YYYY in Postman?

like image 75
Danny Dainton Avatar answered Mar 16 '23 22:03

Danny Dainton