Skip to content

Commit

Permalink
Merge pull request #83 from quickwit-oss/fmassot/fix-field-caps-request
Browse files Browse the repository at this point in the history
Pass query params to the backend for CallResource request
  • Loading branch information
fmassot authored Feb 20, 2024
2 parents dd95279 + ab514eb commit e94eaf1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/quickwit/quickwit.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (ds *QuickwitDatasource) CallResource(ctx context.Context, req *backend.Cal
return err
}

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

qwlog.Info("CallResource", "url", qwUrl.String())

request, err := http.NewRequestWithContext(ctx, req.Method, qwUrl.String(), bytes.NewBuffer(req.Body))
if err != nil {
return err
Expand Down

0 comments on commit e94eaf1

Please sign in to comment.