1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

Move HTTP client to its own package

This commit is contained in:
Frédéric Guillot 2018-04-28 10:51:07 -07:00
parent 04adf5fdf5
commit 1eba1730d1
13 changed files with 64 additions and 64 deletions

View file

@ -8,7 +8,7 @@ import (
"fmt"
"net/url"
"github.com/miniflux/miniflux/http"
"github.com/miniflux/miniflux/http/client"
)
// Client represents a Pinboard client.
@ -30,8 +30,8 @@ func (c *Client) AddBookmark(link, title, tags string, markAsUnread bool) error
values.Add("tags", tags)
values.Add("toread", toRead)
client := http.NewClient("https://api.pinboard.in/v1/posts/add?" + values.Encode())
response, err := client.Get()
clt := client.New("https://api.pinboard.in/v1/posts/add?" + values.Encode())
response, err := clt.Get()
if response.HasServerFailure() {
return fmt.Errorf("pinboard: unable to send bookmark, status=%d", response.StatusCode)
}