Skip to content

Add QueryParams for URL query string construction#59

Merged
SeanTAllen merged 1 commit intomainfrom
add-query-params
Feb 8, 2026
Merged

Add QueryParams for URL query string construction#59
SeanTAllen merged 1 commit intomainfrom
add-query-params

Conversation

@SeanTAllen
Copy link
Copy Markdown
Member

Summary

  • Adds QueryParams primitive in the request package for building URL query strings with proper RFC 3986 percent-encoding
  • Refactors GetRepositoryIssues and Repository.get_issues() to use QueryParams instead of manual string concatenation (which had no URL encoding)
  • Includes 9 example-based tests and 3 PonyCheck property tests (first property-based tests in the project)

Addresses the "Query parameter support" item from discussion #45.

@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Feb 8, 2026
Extracts query parameter building into a reusable QueryParams primitive
with proper RFC 3986 percent-encoding. Previously, GetRepositoryIssues
built query strings via manual concatenation without encoding, meaning
values with special characters would produce malformed URLs.

QueryParams encodes all characters except the RFC 3986 unreserved set
(A-Z, a-z, 0-9, -, ., _, ~) using self-contained logic rather than the
http library's URLEncode, which uses URLPartQuery semantics that leave
& and = unencoded — inappropriate for query parameter values.

Includes example-based and property-based tests (first PonyCheck usage
in the project).
@SeanTAllen SeanTAllen merged commit f61ef57 into main Feb 8, 2026
8 checks passed
@SeanTAllen SeanTAllen deleted the add-query-params branch February 8, 2026 15:34
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Feb 8, 2026
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