aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader/subscription
diff options
context:
space:
mode:
authorGravatar Patrick <pmarschik@users.noreply.github.com>2018-09-20 03:19:24 +0200
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-09-19 18:19:24 -0700
commit2538eea1776e1d03d33465ad2001512caca93937 (patch)
tree021c417d5f31606fe50d7945872c4cda6cdc2060 /reader/subscription
parent1d335390c2ac7c0feeb94fce89eefdae9a1e7c17 (diff)
Add the possibility to override default user agent for each feed
Diffstat (limited to 'reader/subscription')
-rw-r--r--reader/subscription/finder.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/reader/subscription/finder.go b/reader/subscription/finder.go
index 8be6f73..027e810 100644
--- a/reader/subscription/finder.go
+++ b/reader/subscription/finder.go
@@ -29,11 +29,12 @@ var (
)
// FindSubscriptions downloads and try to find one or more subscriptions from an URL.
-func FindSubscriptions(websiteURL, username, password string) (Subscriptions, error) {
+func FindSubscriptions(websiteURL, userAgent, username, password string) (Subscriptions, error) {
defer timer.ExecutionTime(time.Now(), fmt.Sprintf("[FindSubscriptions] url=%s", websiteURL))
clt := client.New(websiteURL)
clt.WithCredentials(username, password)
+ clt.WithUserAgent(userAgent)
response, err := clt.Get()
if err != nil {
if _, ok := err.(errors.LocalizedError); ok {