1// +build go1.6
2
3package swift
4
5import (
6	"net/http"
7	"time"
8)
9
10const IS_AT_LEAST_GO_16 = true
11
12func SetExpectContinueTimeout(tr *http.Transport, t time.Duration) {
13	tr.ExpectContinueTimeout = t
14}
15
16func AddExpectAndTransferEncoding(req *http.Request, hasContentLength bool) {
17	if req.Body != nil {
18		req.Header.Add("Expect", "100-continue")
19	}
20	if !hasContentLength {
21		req.TransferEncoding = []string{"chunked"}
22	}
23}
24