Skip to content
This repository was archived by the owner on Dec 8, 2021. It is now read-only.

New DeleteRoute

Tyler James Leonhardt edited this page Nov 11, 2017 · 4 revisions

NAME

New-DeleteRoute

SYNOPSIS

Adds a new Route with HTTP Method "DELETE"

SYNTAX

New-DeleteRoute [[-Path] <Object>] [[-ScriptBlock] <Object>] [[-ScriptPath] <Object>] [<CommonParameters>]

DESCRIPTION

A shorthand version of doing New-WebRoute -Method "DELETE"

PARAMETERS

  • Path : The HTTP Route/Path/endpoint that you call to trigger this script
  • ScriptBlock : A script block that will be triggered when this HTTP Route/Path/endpoint has been called
  • ScriptPath : A path to a script that will be triggered when this HTTP Route/Path/endpoint has been called
  • CommonParameters

EXAMPLES

# Using a script block
New-DeleteRoute -Path "/helloworld" -ScriptBlock {
   $response.Send('Hello World');
}

# Using a script path
New-DeleteRoute -Path "/helloworld" -ScriptPath ./example.ps1
Clone this wiki locally