Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RequestBuilder ¶
type RequestBuilder struct {
// contains filtered or unexported fields
}
RequestBuilder helps build and execute HTTP requests.
func NewRequestBuilder ¶
func NewRequestBuilder(method, url string) *RequestBuilder
NewRequestBuilder creates a new instance of RequestBuilder.
func (*RequestBuilder) Execute ¶
func (rb *RequestBuilder) Execute() (*http.Response, error)
Execute sends the request and returns the response.
func (*RequestBuilder) WithContext ¶
func (rb *RequestBuilder) WithContext(ctx context.Context) *RequestBuilder
WithContext sets the context for the request.
func (*RequestBuilder) WithHeader ¶
func (rb *RequestBuilder) WithHeader(key, value string) *RequestBuilder
WithHeader adds a header to the request.
func (*RequestBuilder) WithJSONBody ¶
func (rb *RequestBuilder) WithJSONBody(data interface{}) *RequestBuilder
WithJSONBody sets a JSON body for the request.
Click to show internal directories.
Click to hide internal directories.