MCPcopy
hub / github.com/mislav/hub / PostFile

Method PostFile

github/http.go:484–491  ·  view source on GitHub ↗
(path string, contents io.Reader, fileSize int64)

Source from the content-addressed store, hash-verified

482}
483
484func (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
493type simpleResponse struct {
494 *http.Response

Callers 1

UploadReleaseAssetsMethod · 0.80

Calls 2

performRequestMethod · 0.95
SetMethod · 0.45

Tested by

no test coverage detected