Skip to content
This repository was archived by the owner on Aug 31, 2018. It is now read-only.

when assign client cookiejar not attached  #134

@poweroftrue

Description

@poweroftrue

Hi

I'm using goreq (with #131 fix) on app engine and I found when I assign http client cookiejar not attached
I'm using this as a workaround I don't know if there's a better way to implement it:
Do() func:

                 if r.Client == nil {
		// use a client with a cookie jar if necessary. We create a new client not
		// to modify the default one.
		if r.CookieJar != nil {
			r.Client = &http.Client{
				Transport: transport,
				Jar:       r.CookieJar,
			}
		} else {
			r.Client = &http.Client{
				Transport: transport,
			}
		}
	} else {
		if r.CookieJar != nil {
			r.Client.Jar = r.CookieJar
		}
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions