Skip to content

Commit

Permalink
feat: allow also WebDAV HTTP Requests
Browse files Browse the repository at this point in the history
  • Loading branch information
individual-it committed Sep 8, 2020
1 parent 3f6241c commit 2ac811d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/common/request.ts
Expand Up @@ -12,6 +12,13 @@ export enum HTTPMethod {
DELETE = "DELETE",
HEAD = "HEAD",
OPTIONS = "OPTIONS",
COPY = "COPY",
LOCK = "LOCK",
MKCOL = "MKCOL",
MOVE = "MOVE",
PROPFIND = "PROPFIND",
PROPPATCH = "PROPPATCH",
UNLOCK = "UNLOCK",
}

export type methods =
Expand All @@ -22,6 +29,13 @@ export type methods =
| "DELETE"
| "HEAD"
| "OPTIONS"
| "COPY"
| "LOCK"
| "MKCOL"
| "MOVE"
| "PROPFIND"
| "PROPPATCH"
| "UNLOCK"

export class Request {
private readonly transport = Popsicle.createTransport({
Expand Down
2 changes: 1 addition & 1 deletion src/dsl/interaction.spec.ts
Expand Up @@ -68,7 +68,7 @@ describe("Interaction", () => {
interaction.withRequest.bind(interaction, { method: "FOO" })
).to.throw(
Error,
"You must provide a valid HTTP method: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS."
"You must provide a valid HTTP method: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, COPY, LOCK, MKCOL, MOVE, PROPFIND, PROPPATCH, UNLOCK."
)
})

Expand Down

0 comments on commit 2ac811d

Please sign in to comment.