wasmhttp

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWasmHTTPClient

func NewWasmHTTPClient() *http.Client

NewWasmHTTPClient returns an http.Client configured for WASM using browser fetch

Types

type WasmHTTPTransport

type WasmHTTPTransport struct {
	Timeout time.Duration // Request timeout (default: 60s)
}

WasmHTTPTransport implements http.RoundTripper using browser fetch API This allows the standard megaportgo SDK to work in WASM without modification

func (*WasmHTTPTransport) RoundTrip

func (t *WasmHTTPTransport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip executes a single HTTP transaction using browser fetch API This is the core method that bridges Go's http.Client with JavaScript fetch

Jump to

Keyboard shortcuts

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