mirror of
https://github.com/foss42/apidash.git
synced 2025-10-18 04:03:04 +08:00
Strip params utilities
This commit is contained in:
@ -53,6 +53,15 @@ MediaType? getMediaTypeFromHeaders(Map? headers) {
|
||||
return (null, false);
|
||||
}
|
||||
|
||||
String stripUriParams(Uri uri) {
|
||||
return "${uri.scheme}://${uri.authority}${uri.path}";
|
||||
}
|
||||
|
||||
String stripUrlParams(String url) {
|
||||
var idx = url.indexOf("?");
|
||||
return idx > 0 ? url.substring(0, idx) : url;
|
||||
}
|
||||
|
||||
(Uri?, String?) getValidRequestUri(
|
||||
String? url, List<NameValueModel>? requestParams,
|
||||
{String defaultUriScheme = kDefaultUriScheme}) {
|
||||
|
Reference in New Issue
Block a user