mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-07-07 16:48:33 +00:00
get wo body
This commit is contained in:
parent
c2a42587d2
commit
44e10ed65a
2 changed files with 10 additions and 6 deletions
|
@ -125,9 +125,10 @@ func (c *Client) Post(b []byte, to string) (resp *http.Response, err error) {
|
|||
}
|
||||
|
||||
// Create an http GET request with forgejo/gitea specific headers
|
||||
func (c *Client) Get(b []byte, to string) (resp *http.Response, err error) { // ToDo: we might not need the b parameter
|
||||
func (c *Client) Get(to string) (resp *http.Response, err error) { // ToDo: we might not need the b parameter
|
||||
var req *http.Request
|
||||
if req, err = c.NewRequest(http.MethodGet, b, to); err != nil {
|
||||
emptyBody := []byte{0}
|
||||
if req, err = c.NewRequest(http.MethodGet, emptyBody, to); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
resp, err = c.client.Do(req)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue