This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
Persist querystrings in mapbox:// resource urls to API requests - #6182
Merged
Merged
Conversation
|
@jakepruitt, thanks for your PR! By analyzing this pull request, we identified @jfirebaugh, @yhahn and @1ec5 to be potential reviewers. |
|
|
||
| return baseURL + "v4/" + url.substr(protocol.length()) + ".json?access_token=" + accessToken + "&secure"; | ||
| auto queryIdx = url.find("?"); | ||
| std::string query = ""; |
Contributor
There was a problem hiding this comment.
Omit = "" -- it'll be initialized to an empty string automatically.
jakepruitt
force-pushed
the
keep-queries
branch
2 times, most recently
from
August 31, 2016 17:57
373b764 to
d4098d7
Compare
Contributor
There was a problem hiding this comment.
Generally if (!query.empty()) { is better practice since it is faster than query.size().
springmeyer
force-pushed
the
keep-queries
branch
from
August 31, 2016 21:50
d4098d7 to
17e6591
Compare
Contributor
|
Made a refactoring pass and rebased this /cc @jakepruitt. Ready for review by others, notably @jfirebaugh @1ec5 |
| namespace mapbox { | ||
|
|
||
| const std::string protocol = "mapbox://"; | ||
| const std::size_t protocol_length = protocol.length(); |
Carries over any query strings from mapbox://-prefixed styles urls, source urls and tile urls to the api.mapbox.com requests.
jfirebaugh
force-pushed
the
keep-queries
branch
from
September 16, 2016 20:24
17e6591 to
9134ddd
Compare
jfirebaugh
approved these changes
Sep 16, 2016
Contributor
|
Thank you @jfirebaugh! |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Carries over any query strings from
mapbox://-prefixed styles urls, source urls and tile urls to theapi.mapbox.comrequests.cc/ @mapsam @1ec5 @jfirebaugh @yhahn @GretaCB