Skip to content

Feature Request: not following redirects #136

Discussion options

You must be logged in to vote

Nevermind, this can be done by changing the http.Client:

        Client: &http.Client{
            Transport: httpexpect.NewFastBinder(handler),
            CheckRedirect: func(req *http.Request, via []*http.Request) error {
                return http.ErrUseLastResponse
            },
            Jar: httpexpect.NewJar(),
        },

I followed this Stack Overflow question, but apparently, the answers were outdated.

Apologies for the fuss.

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by gavv
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #136 on November 12, 2022 20:31.