RESTinstance icon indicating copy to clipboard operation
RESTinstance copied to clipboard

How to validate specific http header from the response?

Open 4nif opened this issue 2 years ago • 1 comments

  1. Is it possible to validate specific header from the response?
  2. How to validate response time from the response?

4nif avatar Feb 13 '22 10:02 4nif

Hi, sorry for the delay.

  1. Yes, you can query response headers normally. For example
    My Keyword
       Get    /api/forms/1
       ${headers}=    Output    response headers
       # Or
       String    response headers Content-Type    application/json
    
  2. The headers typically have a Date key, so you can just do something like this
    My Keyword
        Get    /api/forms/1
        ${date}=    Output    response headers Date
        # Validate the time using your favourite method
    

asimell avatar Feb 28 '22 06:02 asimell

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Feb 05 '23 02:02 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Feb 20 '23 02:02 github-actions[bot]