[go: up one dir, main page]

to_rfc7231

Function to_rfc7231 

Source
pub fn to_rfc7231(date: &OffsetDateTime) -> String
Expand description

RFC 7231: Requirements for Internet Hosts - Application and Support.

https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.1

In TypeSpec headers are specified as utcDateTime. In REST API specifications headers are specified as "format": "date-time-rfc1123".

This format is also the preferred HTTP date-based header format.

Example string: Sun, 06 Nov 1994 08:49:37 GMT.