Documentation ¶
Index ¶
- Variables
- func AddAuthToRequestHeader(h *http.Header, apiKey string)
- func CheckRes(response *http.Response, err error) error
- func CreateAuthenticatedContext(parentCtx context.Context, apiKey string, baseUrl string) context.Context
- func DetectContentTypeFromUrl(u string) string
- func DownloadFile(url string, file io.Writer) error
- func GetAuthFromContext(ctx context.Context) (baseUrl string, apiKey string)
- func IsValidStatus(response *http.Response) bool
- func NewDefaultClient() *http.Client
- func UploadFile(url string, file io.Reader, fileSize int64) error
- func WaitForCondition(ctx context.Context, message string, condition func() (bool, error), ...) error
- type HTTPError
Constants ¶
This section is empty.
Variables ¶
View Source
var ApiClient = getApiClient()
View Source
var ErrorTimeout = errors.New("timeout")
Functions ¶
func AddAuthToRequestHeader ¶ added in v0.0.41
func DetectContentTypeFromUrl ¶ added in v0.0.45
func GetAuthFromContext ¶ added in v0.0.41
func IsValidStatus ¶ added in v0.0.45
func NewDefaultClient ¶ added in v0.0.59
NewDefaultClient returns a new http.Client with default settings.
Types ¶
Click to show internal directories.
Click to hide internal directories.