I
I
Ivan2019-06-13 17:43:57
RESTful API
Ivan, 2019-06-13 17:43:57

How to insert dynamic value in Headers in Postman?

There is the following request:
http://localhost/rest/api/thing1
It has Headers:

Content-Type:application/json
Machine-Id:ABCD1234
My-Client-Time:{"dateTime":"2019-06-13T17:30:20.40+03:00"}
Authorization:Basic QWERTYYIOPASDFGHJKZXCVMNB1234
My-Machine-Id:ABCD1234

How in
My-Client-Time:{"dateTime":"2019-06-13T17:30:20.40+03:00"}
instead of time to transmit the current in this form?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene Chefranov, 2019-06-13
@iZnatOk

postman.setGlobalVariable('timestampUtcIso8601', (new Date()).toISOString());

https://learning.getpostman.com/docs/postman/script...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question