httpclient

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

SPDX-FileCopyrightText: 2021 SAP SE or an SAP affiliate company and Cloud Security Client Go contributors

SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const UserAgent = "go-sec-lib"

Variables

This section is empty.

Functions

func DefaultHTTPClient

func DefaultHTTPClient(tlsConfig *tls.Config) *http.Client

DefaultHTTPClient

tlsConfig required in case of cert-based identity config

func DefaultTLSConfig

func DefaultTLSConfig(identity env.Identity) (*tls.Config, error)

DefaultTLSConfig creates default tls.Config. Initializes SystemCertPool with cert/key from identity config.

identity provides certificate and key

func NewRequestWithUserAgent added in v0.17.0

func NewRequestWithUserAgent(ctx context.Context, method, url string, body io.Reader) (*http.Request, error)

NewRequestWithUserAgent creates a request and sets the libs custom user agent it would be nicer to set this in the default http.client, but it's discouraged to manipulate the request in RoundTrip per official documentation

Types

This section is empty.

Jump to

Keyboard shortcuts

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