package httpx

import (
	

	
)

// Auth sets the Authorization header using a scheme and token.
// @group Auth
// Applies to both client defaults and request-time overrides.
//
// Example: custom auth scheme
//
//	// Apply to all requests
//	c := httpx.New(httpx.Auth("Token", "abc123"))
//	httpx.Get[string](c, "https://example.com")
//
//	// Apply to a single request
//	httpx.Get[string](httpx.Default(), "https://example.com", httpx.Auth("Token", "abc123"))
func (,  string) OptionBuilder {
	return OptionBuilder{}.Auth(, )
}

func ( OptionBuilder) (,  string) OptionBuilder {
	 :=  + " " + 
	return .add(bothOption(
		func( *Client) {
			.req.SetCommonHeader("Authorization", )
		},
		func( *req.Request) {
			.SetHeader("Authorization", )
		},
	))
}

// Bearer sets the Authorization header with a bearer token.
// @group Auth
// Applies to both client defaults and request-time overrides.
//
// Example: bearer auth
//
//	// Apply to all requests
//	c := httpx.New(httpx.Bearer("token"))
//	httpx.Get[string](c, "https://example.com")
//
//	// Apply to a single request
//	httpx.Get[string](httpx.Default(), "https://example.com", httpx.Bearer("token"))
func ( string) OptionBuilder {
	return OptionBuilder{}.Bearer()
}

func ( OptionBuilder) ( string) OptionBuilder {
	 := "Bearer " + 
	return .add(bothOption(
		func( *Client) {
			.req.SetCommonHeader("Authorization", )
		},
		func( *req.Request) {
			.SetBearerAuthToken()
		},
	))
}

// Basic sets HTTP basic authentication headers.
// @group Auth
// Applies to both client defaults and request-time overrides.
//
// Example: basic auth
//
//	// Apply to all requests
//	c := httpx.New(httpx.Basic("user", "pass"))
//	httpx.Get[string](c, "https://example.com")
//
//	// Apply to a single request
//	httpx.Get[string](httpx.Default(), "https://example.com", httpx.Basic("user", "pass"))
func (,  string) OptionBuilder {
	return OptionBuilder{}.Basic(, )
}

func ( OptionBuilder) (,  string) OptionBuilder {
	 := "Basic " + base64.StdEncoding.EncodeToString([]byte(+":"+))
	return .add(bothOption(
		func( *Client) {
			.req.SetCommonHeader("Authorization", )
		},
		func( *req.Request) {
			.SetBasicAuth(, )
		},
	))
}