Skip to content

Commit

Permalink
Merge pull request #495 from individual-it/support-WebDAV-requests
Browse files Browse the repository at this point in the history
feat: support WebDAV HTTP Requests
  • Loading branch information
mefellows authored Sep 21, 2020
2 parents 5947356 + 2ac811d commit f537df6
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 f537df6

Please sign in to comment.