Summary of the new feature / enhancement
Currently, V2ServerAPICalls and NuGetServerAPICalls build NuGet v2 API call URLs through direct manipulation of the query URL. This has several limitations:
Moving to an object-oriented approach would make these problems easier to avoid altogether.
Proposed technical implementation details (optional)
Refactor V2ServerAPICalls/NuGetServerAPICalls to:
- Utilize some type of container (
List<String>, HashSet<String>, or similar) to hold query clauses, then build a formatted query with combining operators in the appropriate places
- Handle URL encoding through either:
- Off-label use of
HttpValueCollection to dynamically build a query string (with built-in URL-safe encoding)
- Direct serialization of key-value pairs with
Uri.EscapeDataString