(path string, contents io.Reader, fileSize int64)
| 482 | } |
| 483 | |
| 484 | func (c *simpleClient) PostFile(path string, contents io.Reader, fileSize int64) (*simpleResponse, error) { |
| 485 | return c.performRequest("POST", path, contents, func(req *http.Request) { |
| 486 | if fileSize > 0 { |
| 487 | req.ContentLength = fileSize |
| 488 | } |
| 489 | req.Header.Set("Content-Type", "application/octet-stream") |
| 490 | }) |
| 491 | } |
| 492 | |
| 493 | type simpleResponse struct { |
| 494 | *http.Response |
no test coverage detected