add auth, format
This commit is contained in:
@@ -398,7 +398,10 @@ class ApiConstants {
|
||||
/// final url = ApiConstants.buildUrlWithParams('/products/{id}', {'id': '123'});
|
||||
/// // Returns: https://api.worker.example.com/v1/products/123
|
||||
/// ```
|
||||
static String buildUrlWithParams(String endpoint, Map<String, String> params) {
|
||||
static String buildUrlWithParams(
|
||||
String endpoint,
|
||||
Map<String, String> params,
|
||||
) {
|
||||
String url = endpoint;
|
||||
params.forEach((key, value) {
|
||||
url = url.replaceAll('{$key}', value);
|
||||
|
||||
Reference in New Issue
Block a user