resolveAHttpRequest function
Gopeed api: Resolve a request. method: POST
Implementation
Future<http.Response> resolveAHttpRequest(String host, String fileUrl,
{String? method,
Map<String, String>? header,
String? body,
Map<String, String>? labels}) {
Uri targetUri = Uri.http(host, "/api/v1/resolve");
Map<String, dynamic> payload = {"url": fileUrl};
if (method != null || header != null || body != null) {
payload["extra"] =
_buildHttpExtra(method: method, header: header, body: body);
}
if (labels != null) {
payload["labels"] = labels;
}
return http.post(targetUri, body: convert.jsonEncode(payload));
}