Documentation ¶
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 is an HTTP client.
func (*Client) HTTPClient ¶ added in v0.12.2
func (c *Client) HTTPClient(redirect RedirectMode) *http.Client
HTTPClient returns *http.Client.
type ClientOption ¶ added in v0.12.1
type ClientOption func(*Client)
ClientOption is a type that represents an optional function.
func WithBinding ¶ added in v0.12.1
func WithBinding(bind js.Value) ClientOption
WithBinding changes the objects that Fetch API belongs to. This is useful for service bindings, mTLS, etc.
type IncomingBotManagement ¶ added in v0.23.0
type IncomingBotManagement struct { CorporateProxy bool VerifiedBot bool JsDetection *IncomingBotManagementJsDetection StaticResource bool Score int }
func NewIncomingBotManagement ¶ added in v0.23.0
func NewIncomingBotManagement(cf js.Value) *IncomingBotManagement
type IncomingBotManagementJsDetection ¶ added in v0.23.0
type IncomingBotManagementJsDetection struct {
Passed bool
}
func NewIncomingBotManagementJsDetection ¶ added in v0.23.0
func NewIncomingBotManagementJsDetection(cf js.Value) *IncomingBotManagementJsDetection
type IncomingProperties ¶ added in v0.23.0
type IncomingProperties struct { Longitude string Latitude string TLSCipher string Continent string Asn int ClientAcceptEncoding string Country string TLSClientAuth *IncomingTLSClientAuth TLSExportedAuthenticator *IncomingTLSExportedAuthenticator TLSVersion string Colo string Timezone string City string VerifiedBotCategory string // EdgeRequestKeepAliveStatus int RequestPriority string HttpProtocol string Region string RegionCode string AsOrganization string PostalCode string BotManagement *IncomingBotManagement }
func NewIncomingProperties ¶ added in v0.23.0
func NewIncomingProperties(ctx context.Context) (*IncomingProperties, error)
type IncomingTLSClientAuth ¶ added in v0.23.0
type IncomingTLSClientAuth struct { CertIssuerDNLegacy string CertIssuerSKI string CertSubjectDNRFC2253 string CertSubjectDNLegacy string CertFingerprintSHA256 string CertNotBefore string CertSKI string CertSerial string CertIssuerDN string CertVerified string CertNotAfter string CertSubjectDN string CertPresented string CertRevoked string CertIssuerSerial string CertIssuerDNRFC2253 string CertFingerprintSHA1 string }
func NewIncomingTLSClientAuth ¶ added in v0.23.0
func NewIncomingTLSClientAuth(cf js.Value) *IncomingTLSClientAuth
type IncomingTLSExportedAuthenticator ¶ added in v0.23.0
type IncomingTLSExportedAuthenticator struct { ClientFinished string ClientHandshake string ServerHandshake string ServerFinished string }
func NewIncomingTLSExportedAuthenticator ¶ added in v0.23.0
func NewIncomingTLSExportedAuthenticator(cf js.Value) *IncomingTLSExportedAuthenticator
type RedirectMode ¶ added in v0.17.0
type RedirectMode string
RedirectMode represents the redirect mode of a fetch() request.
var ( RedirectModeFollow RedirectMode = "follow" RedirectModeError RedirectMode = "error" RedirectModeManual RedirectMode = "manual" )
func (RedirectMode) IsValid ¶ added in v0.17.0
func (mode RedirectMode) IsValid() bool
func (RedirectMode) String ¶ added in v0.17.0
func (mode RedirectMode) String() string
type Request ¶
Request represents an HTTP request and is part of the Fetch API. Docs: https://developers.cloudflare.com/workers/runtime-apis/request/
type RequestInit ¶ added in v0.17.0
type RequestInit struct { CF *RequestInitCF Redirect RedirectMode }
RequestInit represents the options passed to a fetch() request.
func (*RequestInit) ToJS ¶ added in v0.17.0
func (init *RequestInit) ToJS() js.Value
ToJS converts RequestInit to JS object.
type RequestInitCF ¶ added in v0.17.0
type RequestInitCF struct { }
RequestInitCF represents the Cloudflare-specific options passed to a fetch() request.
Click to show internal directories.
Click to hide internal directories.