Skip to content

feat: send search as HTTP QUERY - #1

Merged
iuhoay merged 2 commits into
mainfrom
query-search
Aug 22, 2026
Merged

iuhoay merged 2 commits into
mainfrom
query-search

Conversation

@iuhoay

@iuhoay iuhoay commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Client half of iuhoay/drift#71, after iuhoay/drift#80.

drift inbox stays GET /api/entries?…. drift search is now:

QUERY /api/entries
Authorization: Bearer …
Content-Type: application/json

{"q":"中","scope":"all","limit":20}
  • Client::search uses ureq request("QUERY", …) + send_json.
  • Collection URL has no query string. CJK stays a JSON string, not percent-encoded.
  • Local Puma (:3000, drift#80 branch) logs Started QUERY "/api/entries" and 401s an unauthenticated search.

Do not merge or cut a v* release until drift#80 is on production. Probe:

curl -X QUERY https://rdrift.app/api/entries \
  -H 'Content-Type: application/json' \
  --data '{"q":"hello"}'

Done when that is 401, not a blank 501. Probed 2026-08-22: still 501 / empty body / no x-runtime.

Split entries(): inbox stays GET /api/entries. Search uses QUERY with
q/scope/limit in a JSON body so the query is not in the URL.

Do not cut a v* release until iuhoay/drift#80 is deployed —
unauthenticated QUERY against production must be 401, not a blank
Puma 501.

Refs iuhoay/drift#71.
@iuhoay
iuhoay merged commit 5593919 into main Aug 22, 2026
1 check passed
@iuhoay
iuhoay deleted the query-search branch August 22, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant