Skip to content

Added method to get query string parameters insignificant of order#36

Open
khaliddermoumi wants to merge 3 commits intotavis-software:mainfrom
khaliddermoumi:master
Open

Added method to get query string parameters insignificant of order#36
khaliddermoumi wants to merge 3 commits intotavis-software:mainfrom
khaliddermoumi:master

Conversation

@khaliddermoumi
Copy link
Copy Markdown

Hi Darell!

Finally I made the change we discussed recently. Notes:

  • added a new method "GetParametersNonStrict()". "GetParameters()" still works as before.
  • "GetParametersNonStrict()" does NOT return null when there's no match, but an empty dictionary
  • "GetParameters()" still returns null when there is no match. I would change this behaviour.
    • if you want me to change this, please let me know, I'm into the code now and can do it in a minute
  • added some unit tests

Regards,
Khalid

…meters()" that ignores the order of query parameters. Note that this method returns an empty dictionary instead of null when no match is found.

Plus some unit tests.
@khaliddermoumi
Copy link
Copy Markdown
Author

Darell,
I just fixed a bug meanwhile.

@darrelmiller
Copy link
Copy Markdown
Member

Thanks for this PR. Unfortunately, it is hard to review the changes because it appears that every line seems to have changed in the URITemplate class. I will try and look again later today.

@khaliddermoumi
Copy link
Copy Markdown
Author

khaliddermoumi commented Jul 1, 2016

Hi Darell,

my Visual Studio wanted to indent the lines evenly (a part of the class was indented with 4 spaces less than the rest). The github UI doesn't "ignore whitespace" in diffs.
Try reviewing the changes in VS.

Regards

@khaliddermoumi
Copy link
Copy Markdown
Author

How about it, Darell? Any plans to make a change here?

@darrelmiller
Copy link
Copy Markdown
Member

@khaliddermoumi Sorry for going dark. Yes, I'd like to incorporate this change as part of a bigger fix. It turns out there is an issue with parsing arrays of values, reported by Anthony from Glimpse. Depending on where the parameter is in the URITemplate there are different delimiters that are allowed. Therefore I am going to have to split the URL into authority, path, query and fragment in order to do parameter matching. This will allow me to apply different rules to the query.
Hopefully next week I'll get a chance to work on this.

@khaliddermoumi
Copy link
Copy Markdown
Author

Thx Darrel!

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