mirror of
https://github.com/foss42/apidash.git
synced 2025-12-02 10:49:49 +08:00
http method options
This commit is contained in:
@@ -17,7 +17,8 @@ enum HTTPVerb {
|
||||
post("POST"),
|
||||
put("PUT"),
|
||||
patch("PAT"),
|
||||
delete("DEL");
|
||||
delete("DEL"),
|
||||
options("OPT");
|
||||
|
||||
const HTTPVerb(this.abbr);
|
||||
final String abbr;
|
||||
|
||||
@@ -104,6 +104,17 @@ Future<(HttpResponse?, Duration?, String?)> sendHttpRequest(
|
||||
final streamed = await client.send(request);
|
||||
response = await http.Response.fromStream(streamed);
|
||||
break;
|
||||
case HTTPVerb.options:
|
||||
final request = prepareHttpRequest(
|
||||
url: requestUrl,
|
||||
method: requestModel.method.name.toUpperCase(),
|
||||
headers: headers,
|
||||
body: body,
|
||||
overrideContentType: overrideContentType,
|
||||
);
|
||||
final streamed = await client.send(request);
|
||||
response = await http.Response.fromStream(streamed);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (apiType == APIType.graphql) {
|
||||
|
||||
Reference in New Issue
Block a user