mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-19 15:23:36 +00:00
Checking ifModifiedSince param
This commit is contained in:
1 parent
841d8f457f
commit
b8948c417e
5 files changed
+88
-22
No files matched your search
+7
-2
@@ -6,6 +6,7 @@ import (
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
_ "github.com/deluan/gosonic/conf"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -15,8 +16,12 @@ const (
|
||||
testVersion = "1.0.0"
|
||||
)
|
||||
|
||||
func AddParams(url string) string {
|
||||
return fmt.Sprintf("%s?u=%s&p=%s&c=%s&v=%s", url, testUser, testPassword, testClient, testVersion)
|
||||
func AddParams(endpoint string, params ...string) string {
|
||||
url := fmt.Sprintf("%s?u=%s&p=%s&c=%s&v=%s", endpoint, testUser, testPassword, testClient, testVersion)
|
||||
if len(params) > 0 {
|
||||
url = url + "&" + strings.Join(params, "&")
|
||||
}
|
||||
return url
|
||||
}
|
||||
|
||||
func Get(url string, testCase string) (*http.Request, *httptest.ResponseRecorder) {
|
||||
|
||||
Reference in new issue
Block a user