Skip to content

Commit

Permalink
feat: httpRequest to add HEAD method (#4574)
Browse files Browse the repository at this point in the history
* httpRequest to add HEAD method

* 4574 - feat HEAD request resolving feedback and running test actions
  • Loading branch information
torresbj authored Nov 30, 2023
1 parent 60824fe commit 435bcf6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,7 @@ export class HasPendingActionsFunction extends ExpressionEvaluator {
export enum HttpMethod {
DELETE = "DELETE",
GET = "GET",
HEAD = "HEAD",
PATCH = "PATCH",
POST = "POST",
PUT = "PUT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"POST",
"PATCH",
"PUT",
"DELETE"
"DELETE",
"HEAD"
],
"examples": [
"GET",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ export enum HttpMethod {
* Http DELETE
*/
DELETE = 'DELETE',

/**
* Http HEAD
*/
HEAD = 'HEAD',
}

/**
Expand Down Expand Up @@ -313,6 +318,7 @@ export class HttpRequest<O extends object = {}> extends Dialog<O> implements Htt
switch (this.method) {
case HttpMethod.DELETE:
case HttpMethod.GET:
case HttpMethod.HEAD:
response = await fetch(instanceUrl, {
method: instanceMethod,
headers: instanceHeaders,
Expand Down
3 changes: 2 additions & 1 deletion libraries/tests.schema
Original file line number Diff line number Diff line change
Expand Up @@ -3801,7 +3801,8 @@
"POST",
"PATCH",
"PUT",
"DELETE"
"DELETE",
"HEAD"
],
"examples": [
"GET",
Expand Down
3 changes: 2 additions & 1 deletion libraries/tests.uischema
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"triggers",
"generator",
"selector",
"schema"
"schema",
"dialogs"
],
"label": "Adaptive dialog",
"order": [
Expand Down

0 comments on commit 435bcf6

Please sign in to comment.