X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f69605f9427aa401b0f83c1e131e3c455eae4e38..c797b629ddb0cf2808123a1b86d31b0153f1aca0:/sdk/go/arvados/client.go?ds=sidebyside diff --git a/sdk/go/arvados/client.go b/sdk/go/arvados/client.go index 5c6a7b52f4..52c75d5113 100644 --- a/sdk/go/arvados/client.go +++ b/sdk/go/arvados/client.go @@ -306,6 +306,7 @@ func (c *Client) RequestAndDecode(dst interface{}, method, path string, body io. return c.RequestAndDecodeContext(context.Background(), dst, method, path, body, params) } +// RequestAndDecodeContext does the same as RequestAndDecode, but with a context func (c *Client) RequestAndDecodeContext(ctx context.Context, dst interface{}, method, path string, body io.Reader, params interface{}) error { if body, ok := body.(io.Closer); ok { // Ensure body is closed even if we error out early