aboutsummaryrefslogtreecommitdiffhomepage
path: root/integration/nunuxkeeper
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2018-04-28 10:51:07 -0700
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-04-28 10:51:07 -0700
commit1eba1730d1af50ed545f4fde78b22d6fb62ca11e (patch)
tree61f99282f66529b42625a8f335593bdcb461459c /integration/nunuxkeeper
parent04adf5fdf53951f270923c41171a52575db53e46 (diff)
Move HTTP client to its own package
Diffstat (limited to 'integration/nunuxkeeper')
-rw-r--r--integration/nunuxkeeper/nunuxkeeper.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/integration/nunuxkeeper/nunuxkeeper.go b/integration/nunuxkeeper/nunuxkeeper.go
index 4627e8d..4ea5c45 100644
--- a/integration/nunuxkeeper/nunuxkeeper.go
+++ b/integration/nunuxkeeper/nunuxkeeper.go
@@ -9,7 +9,7 @@ import (
"net/url"
"path"
- "github.com/miniflux/miniflux/http"
+ "github.com/miniflux/miniflux/http/client"
)
// Document structure of a Nununx Keeper document
@@ -39,8 +39,10 @@ func (c *Client) AddEntry(link, title, content string) error {
if err != nil {
return err
}
- client := http.NewClientWithCredentials(apiURL, "api", c.apiKey)
- response, err := client.PostJSON(doc)
+
+ clt := client.New(apiURL)
+ clt.WithCredentials("api", c.apiKey)
+ response, err := clt.PostJSON(doc)
if response.HasServerFailure() {
return fmt.Errorf("nunux-keeper: unable to send entry, status=%d", response.StatusCode)
}