Closed thorrak closed 2 years ago
This is fixed by #43
You should have read my mind.
Okay I've compromised: I've marked this as deprecated but left it as public. In the future you should be able to concatenate what you need from the RFC 3986 components.
Here's what I ended up replacing getAfterPath with:
String lcburl_getAfterPath(LCBUrl url) // Get anything after the path
{
String afterpath = "";
if (url.getQuery().length() > 0) {
afterpath = "?" + url.getQuery();
}
if (url.getFragment().length() > 0) {
afterpath = afterpath + "#" + url.getFragment();
}
return afterpath;
}
Not sure entirely how I feel about the above, given all the String mutation, but it solves the problem while using non-deprecated interfaces.
It's not efficient - I'm all ears how to get some more efficiencies out of the library.
make getAfterPath public. :)
It is! Says right there, public
.
You talked me into it - 1.1.8 will have this reverted.
Commit https://github.com/lbussy/LCBUrl/commit/0c86cc7cbc9d1901648a0d485da38afa0590cc18 changed getAfterPath() from being public to private. This was a breaking change, as getAfterPath is used in TiltBridge.
This is actually quite helpful when manually constructing HTTP requests, and thus would be helpful to be public.