Skip to content

Sending back cookies #155

Closed
Closed
@teamon

Description

@teamon

In #37 (comment) @florinpatrascu wrote

hi there - sorry for piggybacking on this older thread. It is about cookies, and I just started using Tesla. Are there any examples of how to handle the cookies, with Tesla. Right now I just want to be able to send back the cookies I am getting from the server i.e JSESSIONID - Thank you

There isn't anything built-in specific to cookies, but you can do it yourself with something alongs these lines:

env = post("/login")
cookie = env.headers["set-cookie"]
get("/stuff", headers: %{"cookie" => cookie})

WARNING: Not tested!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions