Skip to content

Commit e94eaf1

Browse files
authored
Merge pull request #83 from quickwit-oss/fmassot/fix-field-caps-request
Pass query params to the backend for CallResource request
2 parents dd95279 + ab514eb commit e94eaf1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/quickwit/quickwit.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func (ds *QuickwitDatasource) CallResource(ctx context.Context, req *backend.Cal
154154
return err
155155
}
156156

157-
resourcePath, err := url.Parse(req.Path)
157+
resourcePath, err := url.Parse(req.URL)
158158
if err != nil {
159159
return err
160160
}
@@ -163,6 +163,8 @@ func (ds *QuickwitDatasource) CallResource(ctx context.Context, req *backend.Cal
163163
qwUrl.RawQuery = resourcePath.RawQuery
164164
qwUrl.Path = path.Join(qwUrl.Path, resourcePath.Path)
165165

166+
qwlog.Info("CallResource", "url", qwUrl.String())
167+
166168
request, err := http.NewRequestWithContext(ctx, req.Method, qwUrl.String(), bytes.NewBuffer(req.Body))
167169
if err != nil {
168170
return err

0 commit comments

Comments
 (0)