Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to sent cookies to a endpoint from a variable #131

Open
DarylStark opened this issue May 5, 2022 · 0 comments
Open

Unable to sent cookies to a endpoint from a variable #131

DarylStark opened this issue May 5, 2022 · 0 comments

Comments

@DarylStark
Copy link

DarylStark commented May 5, 2022

I'm trying to sent a cookie to a endpoint that I received in a previous call.

For example; I first send a request to my login endpoint

let login = POST http://localhost:5000/login

{
    "username": "user1",
    "password": "xxx"
}

The response contains a cookie in the headers with the session

Set-Cookie    0: session=very_long_session_id; HttpOnly; Path=/

Next, I want to send this cookie to other endpoints;

GET http://localhost:5000/endpoint
Cookie: $login.headers.Set-Cookie[0]

But the RESTbook send the literal string $login.headers.Set-Cookie[0] instead of the value that was in the first cookie. When I drop the [0] index of the variable, it sends the complete string, including the ['s and "'s. It should send the cookie from the request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant