"date/Date" header added in API response

Hi,

We are in a situation where we have to depend on the "date/Date" header returned in api response.
Before that, we want to make sure this is consistent and have same format through-out.

Can you please help me understanding where this header will get added to API response and is it safe to depend on this date? (guess this will be added by router/message processor)

Thank you in advance.


Regards,

Mahantesh

Solved Solved
1 6 565
1 ACCEPTED SOLUTION

Yes, you can depend on Apigee transmitting the date header in an API response.

View solution in original post

6 REPLIES 6

where we have to depend on the "date/Date" header returned in api response.

Maybe you could elaborate a little on what your requirement is, what you are trying to do.

Per RFC7231, Origin servers are expected to insert a date header in each response. I believe Apigee Edge will insert a date header in responses that do not contain date headers.

is it safe to depend on this date?

What do you mean by "depend on" ? Explain your scenario. Try to be specific.

Thank you @Dino-at-Google. API we are trying to expose is for mobile app.

So, in one business scenario app team wanted use the date header returned in api response for calculation to decide whether to display some content to user or not.

Here app doesn't want to depend on device date-time because that is some thing user can change.

So, we wanted to be sure before confirming to app that is it okay to depend on this header or not.

Thanks again !!


Yes, you can depend on Apigee transmitting the date header in an API response.

Thank you @Dino-at-Google


What would be timezone of the date if its APIGEE SaaS? I am assuming it would server time zone if its APIGEE Edge.

the header specifies a timezone (GMT). It looks like this:

Date: Wed, 14 Nov 2018 23:29:47 GMT