oph.common.util.http-util

cachable-response

(cachable-response req vseq)

csv-download-response

(csv-download-response data filename)

file-download-response

(file-download-response data filename content-type)(file-download-response data filename content-type options)

file-upload-response

(file-upload-response data)

format-http-date

(format-http-date d)

get-cache-date

(get-cache-date req)

get-cache-headers

(get-cache-headers last-modified)

korvaa-virheteksti

(korvaa-virheteksti virhetekstit virhe)

korvaa-virhetekstit

(korvaa-virhetekstit valip-errors virhetekstit)

luo-validoinnin-virhevastaus

(luo-validoinnin-virhevastaus virheet virhetekstit)

parse-http-date

(parse-http-date d)

parse-iso-date

(parse-iso-date d)
Does not support all valid ISO date format presentations: https://en.wikipedia.org/wiki/ISO_8601#Dates

response-nocache

(response-nocache data)

response-nocache-strict

(response-nocache-strict data)

response-or-404

(response-or-404 data)

sallittu-jos

macro

(sallittu-jos ehto & body)

try-parse-local-date

(try-parse-local-date f d)

try-parse-local-date-with-tz

(try-parse-local-date-with-tz f d)
Use Helsinki time zone to adjust time zone, not system default.

validoi

macro

(validoi m saannot virhetekstit & body)

validoi*

(validoi* m saannot virhetekstit f)

validoi-entity-saannoilla

(validoi-entity-saannoilla entity saannot)