http

package
v2.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package http provides HTTP client functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides HTTP operations for Salesforce API.

func NewClient

func NewClient(cfg Config) *Client

NewClient creates a new HTTP client.

func (*Client) APIVersion

func (c *Client) APIVersion() string

APIVersion returns the API version.

func (*Client) BaseURL

func (c *Client) BaseURL() string

BaseURL returns the base URL.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, path string) ([]byte, error)

Delete performs a DELETE request.

func (*Client) Get

func (c *Client) Get(ctx context.Context, path string) ([]byte, error)

Get performs a GET request.

func (*Client) Patch

func (c *Client) Patch(ctx context.Context, path string, body interface{}) ([]byte, error)

Patch performs a PATCH request.

func (*Client) Post

func (c *Client) Post(ctx context.Context, path string, body interface{}) ([]byte, error)

Post performs a POST request.

func (*Client) Put

func (c *Client) Put(ctx context.Context, path string, body interface{}) ([]byte, error)

Put performs a PUT request.

func (*Client) SetAccessToken

func (c *Client) SetAccessToken(token string)

SetAccessToken sets the access token.

func (*Client) SetBaseURL

func (c *Client) SetBaseURL(url string)

SetBaseURL sets the base URL.

type Config

type Config struct {
	HTTPClient *http.Client
	BaseURL    string
	APIVersion string
	Logger     types.Logger
	MaxRetries int
	RetryDelay time.Duration
}

Config holds HTTP client configuration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL