-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add procedures to Get/Remove for UriBuilder Query Paramaters/Flags (#…
…2247) <!-- Thank you for submitting a Pull Request. If you're new to contributing to BCApps please read our pull request guideline below * https://github.com/microsoft/BCApps/Contributing.md --> #### Summary <!-- Provide a general summary of your changes --> UriBuilder procedures can only Add/Replace Query Flags/Parameters, while the internal procedure can parse them and set them, so I want to be able to use that to only Get/Remove from the collection. There are different ways to implement this and many ways to test this, I just wanted to propose this approach which reuses what's already there for AddQueryFlag/Parameter, figuring we might need something like this for the upcoming HttpClient mocking: https://www.yammer.com/dynamicsnavdev/#/threads/show?threadId=3029127257333760 (why expose a special QueryParameter dictionary if we already have Uri/UriBuilder codeunits that are supposed to expose these structures for us?) The new procedures added are: ```al procedure RemoveQueryFlag(Flag: Text; DuplicateAction: Enum "Uri Query Duplicate Behaviour") procedure RemoveQueryFlag(Flag: Text) procedure RemoveQueryParameter(ParameterKey: Text; ParameterValue: Text; DuplicateAction: Enum "Uri Query Duplicate Behaviour") procedure RemoveQueryParameter(ParameterKey: Text; ParameterValue: Text) procedure RemoveQueryParameters() procedure GetQueryFlags(): List of [Text] procedure GetQueryParameters(): Dictionary of [Text, List of [Text]] procedure GetQueryParameter(ParameterKey: Text): List of [Text] ``` #### Work Item(s) <!-- Add the issue number here after the #. The issue needs to be open and approved. Submitting PRs with no linked issues or unapproved issues is highly discouraged. --> Fixes #2248 Fixes [AB#555623](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/555623)
- Loading branch information
1 parent
3105c1e
commit 582548b
Showing
3 changed files
with
385 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.