~nskaggs/+junk/xenial-test

« back to all changes in this revision

Viewing changes to src/github.com/Azure/azure-sdk-for-go/core/http/jar.go

  • Committer: Nicholas Skaggs
  • Date: 2016-10-24 20:56:05 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161024205605-z8lta0uvuhtxwzwl
Initi with beta15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2011 The Go Authors. All rights reserved.
 
2
// Use of this source code is governed by a BSD-style
 
3
// license that can be found in the LICENSE file.
 
4
 
 
5
package http
 
6
 
 
7
import (
 
8
        "net/url"
 
9
)
 
10
 
 
11
// A CookieJar manages storage and use of cookies in HTTP requests.
 
12
//
 
13
// Implementations of CookieJar must be safe for concurrent use by multiple
 
14
// goroutines.
 
15
//
 
16
// The net/http/cookiejar package provides a CookieJar implementation.
 
17
type CookieJar interface {
 
18
        // SetCookies handles the receipt of the cookies in a reply for the
 
19
        // given URL.  It may or may not choose to save the cookies, depending
 
20
        // on the jar's policy and implementation.
 
21
        SetCookies(u *url.URL, cookies []*Cookie)
 
22
 
 
23
        // Cookies returns the cookies to send in a request for the given URL.
 
24
        // It is up to the implementation to honor the standard cookie use
 
25
        // restrictions such as in RFC 6265.
 
26
        Cookies(u *url.URL) []*Cookie
 
27
}