MCPcopy Create free account
hub / github.com/gogs/gogs / newRequest

Function newRequest

internal/httplib/httplib.go:56–66  ·  view source on GitHub ↗

return *Request with specific method

(url, method string)

Source from the content-addressed store, hash-verified

54
55// return *Request with specific method
56func newRequest(url, method string) *Request {
57 var resp http.Response
58 req := http.Request{
59 Method: method,
60 Header: make(http.Header),
61 Proto: "HTTP/1.1",
62 ProtoMajor: 1,
63 ProtoMinor: 1,
64 }
65 return &Request{url, &req, map[string]string{}, map[string]string{}, defaultSetting, &resp, nil}
66}
67
68// Get returns *Request with GET method.
69func Get(url string) *Request {

Callers 5

GetFunction · 0.85
PostFunction · 0.85
PutFunction · 0.85
DeleteFunction · 0.85
HeadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected