httpT

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Enter

type Enter[T any] struct{}

func (*Enter[T]) FormPost added in v1.0.4

func (e *Enter[T]) FormPost(url string, reqEntity T, headerEntity ...map[string]string) ([]byte, error)

FormPost 这里的contenttype只支持application/x-www-form-urlencoded, reqEntity这个可以是任意类型,reqEntity如果是结构体最好有设置json的tag

func (*Enter[T]) Get

func (e *Enter[T]) Get(url string, headerEntity ...map[string]string) ([]byte, error)

func (*Enter[T]) Post

func (e *Enter[T]) Post(url string, reqEntity T, headerEntity ...map[string]string) ([]byte, error)

Post 这里的contenttype只支持application/json, reqEntity这个可以是任意类型,reqEntity如果是结构体最好有设置json的tag

Jump to

Keyboard shortcuts

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