Skip to content

Handle HttpQuery in routing case statement - #335

Merged
dom96 merged 1 commit into
dom96:masterfrom
canermastan:fix/handle-httpquery
Jul 29, 2026
Merged

Handle HttpQuery in routing case statement#335
dom96 merged 1 commit into
dom96:masterfrom
canermastan:fix/handle-httpquery

Conversation

@canermastan

Copy link
Copy Markdown
Contributor

Summary

This PR adds support for HttpQuery in Jester's route matcher (caseStmt) to prevent compilation errors on recent/upcoming Nim versions where HttpQuery is added to std/httpcore (nim-lang/Nim#25933).

Details

  • Nim's HttpMethod enum includes HttpQuery.
  • Since Jester generates an exhaustive case statement over request.reqMethod, missing HttpQuery causes Error: not all cases are covered; missing: {HttpQuery} during package testing (e.g. Nitter in Nim's CI).
  • This patch treats HttpQuery the same as HttpGet when declared (when declared(HttpQuery)), ensuring backward compatibility with older Nim versions while making the match exhaustive on newer versions.

@dom96 dom96 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks!

@dom96
dom96 merged commit 8a491a8 into dom96:master Jul 29, 2026
0 of 6 checks passed
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.

2 participants