Documentation
¶
Index ¶
- func Do(request *http.Request, timeout time.Duration, checkCertificate bool) ([]byte, error)
- func NewPostRequest(url string, body any) (*http.Request, error)
- func NewPostRequestWithBearer(url string, body any, token string) (*http.Request, error)
- func NewPutRequest(url string, body any) (*http.Request, error)
- func NewPutRequestWithBearer(url string, body any, token string) (*http.Request, error)
- func NewRequest(url string) (*http.Request, error)
- func NewRequestWithBearer(url string, token string) (*http.Request, error)
- func Read[T any](request *http.Request, timeout time.Duration, checkCertificate bool) (T, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPostRequest ¶
NewPostRequest creates a new request for the given url and the body as payload. The url have to provide free access without any authentication. For authentication use other functions like NewPostRequestWithBearer.
func NewPostRequestWithBearer ¶
NewPostRequestWithBearer creates a new request for the given url. The url have is authenticated with a barrier token.
func NewPutRequest ¶
NewPutRequest creates a new request for the given url and the body as payload. The url have to provide free access without any authentication. For authentication use other functions like NewPutRequestWithBearer.
func NewPutRequestWithBearer ¶
NewPutRequestWithBearer creates a new request for the given url. The url have is authenticated with a barrier token.
func NewRequest ¶
NewRequest creates a new request for the given url. The url have to provide free access without any authentication. For authentication use other functions like NewGetRequestWithBarrier.
func NewRequestWithBearer ¶
NewRequestWithBearer creates a new request for the given url. The url have is authenticated with a barrier token.
Types ¶
This section is empty.