nw_request

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HashSeed

type HashSeed struct {
	Url      string            `json:"u"`
	Method   string            `json:"m"`
	Param    string            `json:"p"`
	Length   int64             `json:"l"`
	Header   map[string]string `json:"h"`
	PeerName string            `json:"n"`
}

func (HashSeed) Hash

func (z HashSeed) Hash() string

type Req

type Req struct {
	RequestMethod  string            `json:"method"`
	RequestUrl     string            `json:"url"`
	RequestParam   string            `json:"param,omitempty"`
	RequestHeaders map[string]string `json:"headers"`
	ContentLength  int64             `json:"content_length"`
	RequestHash    string            `json:"hash"`
	Peer           string            `json:"peer"`
}

func (*Req) Apply

func (z *Req) Apply(ctx api_context.Context, rb nw_client.RequestBuilder, req *http.Request)

Jump to

Keyboard shortcuts

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