181186 - Criar PDV Android para rodar em maquinas P.O.S.
This commit is contained in:
commit
c9983cbad5
204 files changed
+11453
No files matched your search
@@ -0,0 +1,15 @@
|
||||
class OdooApiUriBuilder {
|
||||
OdooApiUriBuilder._();
|
||||
|
||||
static Uri endpoint(Uri serverUri, String endpointPath) {
|
||||
final basePath = serverUri.path.replaceFirst(RegExp(r'/+$'), '');
|
||||
final normalizedEndpoint =
|
||||
endpointPath.startsWith('/') ? endpointPath : '/$endpointPath';
|
||||
return Uri(
|
||||
scheme: serverUri.scheme,
|
||||
host: serverUri.host,
|
||||
port: serverUri.hasPort ? serverUri.port : null,
|
||||
path: '$basePath$normalizedEndpoint',
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user