Ad Widget

Collapse

XML Request Body with current time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Backstage24
    Junior Member
    • Oct 2019
    • 3

    #1

    XML Request Body with current time

    Hello everybody

    I would like a request body (XML) in a HTTP Agent there set the current timestamp.
    The time format is 2024-10-02T09:02:00.

    First try: I put the following in the request body
    Code:
    <RequestTimestamp>{{TIME}.fmttime(%Y-%m-%dT%H:%M:%S)}</RequestTimestamp>
    The {TIME} macro is not supported in request bodies; maybe...

    Second try: I put the following in the request body
    Code:
     <RequestTimestamp>{$CURTIME}</RequestTimestamp>
    I created a User Macro in the template: {$CURTIME} = {{TIME}.fmttime(%Y-%m-%dT%H:%M:%S)}

    No of this tries was useful. What can I do differently to ensure a successful attempt?
Working...