mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
http client: remove dependency on global config options
This commit is contained in:
parent
065331c77f
commit
16b7b3bc3e
7 changed files with 148 additions and 72 deletions
|
@ -7,6 +7,7 @@ package ui // import "miniflux.app/ui"
|
|||
import (
|
||||
"net/http"
|
||||
|
||||
"miniflux.app/config"
|
||||
"miniflux.app/http/client"
|
||||
"miniflux.app/http/request"
|
||||
"miniflux.app/http/response/html"
|
||||
|
@ -87,7 +88,7 @@ func (h *handler) fetchOPML(w http.ResponseWriter, r *http.Request) {
|
|||
view.Set("countUnread", h.store.CountUnreadEntries(user.ID))
|
||||
view.Set("countErrorFeeds", h.store.CountErrorFeeds(user.ID))
|
||||
|
||||
clt := client.New(url)
|
||||
clt := client.NewClientWithConfig(url, config.Opts)
|
||||
resp, err := clt.Get()
|
||||
if err != nil {
|
||||
view.Set("errorMessage", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue