hzadaptor

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package hzadaptor provides utilities for adapting between Hertz protocol types and Go's standard library types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToHTTPRequest

func ToHTTPRequest(ctx context.Context, req *protocol.Request) (*http.Request, error)

ToHTTPRequest converts a Hertz protocol.Request to a standard library http.Request. This is designed for client-side use where we need to send a request using net/http.

Note: The body is read from the request, so for streaming bodies this should be called only once. The returned request will have the body set appropriately.

Types

This section is empty.

Jump to

Keyboard shortcuts

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