fsprojects / FsHttp

A lightweight F# HTTP library by @SchlenkR and @dawedawe
https://fsprojects.github.io/FsHttp/
Apache License 2.0
424 stars 42 forks source link

Provide convenient way for getting response cookies #98

Open SchlenkR opened 2 years ago

SchlenkR commented 2 years ago
let setCookieKey = "Set-Cookie"
let cookies (response: Response) =
    response.headers 
    |> Seq.filter (fun h -> h.Key = setCookieKey)
    |> Seq.map (fun h -> h.Value)
    |> Seq.toList