Skip to content

http_headers_date function #22

@asg017

Description

@asg017

to parse common headers date formated as Tue, 26 Oct 2021 05:15:58 GMT

sqlite datetime can't parse this on it's own, so it's annoying. this func would format it for use with other sqlite datetime utils

date, last modified, etc

https://httpwg.org/specs/rfc7231.html#http.date

Option #1

select 
  http_headers_date(response_headers), 
  http_headers_date(response_headers, 'last-modified') 
from ...;

Option #2

select 
  http_headers_date(
    http_headers_get(response_headers, 'Date')
  ),
  http_headers_date(
    http_headers_get(response_headers, 'Last-Modified')
  )
from ...;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions