return *Request with specific method
(url, method string)
| 54 | |
| 55 | // return *Request with specific method |
| 56 | func newRequest(url, method string) *Request { |
| 57 | var resp http.Response |
| 58 | req := http.Request{ |
| 59 | Method: method, |
| 60 | Header: make(http.Header), |
| 61 | Proto: "HTTP/1.1", |
| 62 | ProtoMajor: 1, |
| 63 | ProtoMinor: 1, |
| 64 | } |
| 65 | return &Request{url, &req, map[string]string{}, map[string]string{}, defaultSetting, &resp, nil} |
| 66 | } |
| 67 | |
| 68 | // Get returns *Request with GET method. |
| 69 | func Get(url string) *Request { |