| external help file | Pretendpoint.dll-Help.xml |
|---|---|
| Module Name | Pretendpoint |
| online version | |
| schema | 2.0.0 |
Starts an HTTP listener to receive a single request, whose body is returned, supporting static or dynamic respnoses.
Get-WebRequestBody [-Encoding <String>] [-Body <Object>] [-ResponseEncoding <String>] [-ContentType <String>]
[-StatusCode <HttpStatusCode>] [-IncludeHeaders] [-Port] <Int32[]>
[-AuthenticationSchemes <AuthenticationSchemes>] [-Realm <String>] [-IgnoreWriteExceptions]
[<CommonParameters>]
Get-WebRequestBody [-Encoding <String>] -Response <ScriptBlock> [-IncludeHeaders] [-Port] <Int32[]>
[-AuthenticationSchemes <AuthenticationSchemes>] [-Realm <String>] [-IgnoreWriteExceptions]
[<CommonParameters>]
{{ Fill in the Description }}
PS C:\> Get-WebRequestBody -Port 8080Waits for a request to http://localhost:8080/ , prints out the request body, and returns an HTTP 204.
Ports on the localhost to bind to.
Type: Int32[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseClient authentication methods to support.
Type: AuthenticationSchemes
Parameter Sets: (All)
Aliases:
Accepted values: None, Digest, Negotiate, Ntlm, IntegratedWindowsAuthentication, Basic, Anonymous
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseData to send as a response body.
Type: Object
Parameter Sets: StaticResponse
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseSets the content type of the response body.
Type: String
Parameter Sets: StaticResponse
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseForces an encoding for the request body; byte or hex for binary, others for text.
Type: String
Parameter Sets: (All)
Aliases: Incoding
Accepted values: ascii, byte, hex, utf16, utf16BE, utf32, utf32BE, utf7, utf8
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseIndicates that response writes shouldn't generate exceptions.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe RFC2617 authentication realm.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseA script block that accepts an HttpListenerContext parameter to respond with.
Type: ScriptBlock
Parameter Sets: DynamicResponse
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSets an encoding for the response body.
Type: String
Parameter Sets: StaticResponse
Aliases: Outcoding
Accepted values: ascii, utf16, utf16BE, utf32, utf32BE, utf7, utf8
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSets the HTTP response status code.
Type: HttpStatusCode
Parameter Sets: StaticResponse
Aliases:
Accepted values: Continue, SwitchingProtocols, Processing, EarlyHints, OK, Created, Accepted, NonAuthoritativeInformation, NoContent, ResetContent, PartialContent, MultiStatus, AlreadyReported, IMUsed, MultipleChoices, Ambiguous, MovedPermanently, Moved, Found, Redirect, SeeOther, RedirectMethod, NotModified, UseProxy, Unused, TemporaryRedirect, RedirectKeepVerb, PermanentRedirect, BadRequest, Unauthorized, PaymentRequired, Forbidden, NotFound, MethodNotAllowed, NotAcceptable, ProxyAuthenticationRequired, RequestTimeout, Conflict, Gone, LengthRequired, PreconditionFailed, RequestEntityTooLarge, RequestUriTooLong, UnsupportedMediaType, RequestedRangeNotSatisfiable, ExpectationFailed, MisdirectedRequest, UnprocessableEntity, Locked, FailedDependency, UpgradeRequired, PreconditionRequired, TooManyRequests, RequestHeaderFieldsTooLarge, UnavailableForLegalReasons, InternalServerError, NotImplemented, BadGateway, ServiceUnavailable, GatewayTimeout, HttpVersionNotSupported, VariantAlsoNegotiates, InsufficientStorage, LoopDetected, NotExtended, NetworkAuthenticationRequired
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseIndicates that the HTTP request headers should be output.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.