< Back

Invoke-RestMethodWithRetry

Sat Jan 11, 2020 2:43 pm

NAME Invoke-RestMethodWithRetry



SYNOPSIS

This function invokes a REST method call repeatedly if an error or failed call occurs.





SYNTAX

Invoke-RestMethodWithRetry -uri <String> [-headers <Object>] [-body <Object>] -method <String>

-intervalMilliseconds <Int32> -maximumNumberOfCalls <Int32> [-returnUnsuccessfulResponseObject]

[<CommonParameters>]





DESCRIPTION





PARAMETERS

-uri <String>

The Uniform Resource Identifier (URI) of the Internet resource to which the

web request is sent.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-headers <Object>

The headers of the web request.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-body <Object>

The body of the web request.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-method <String>

The method of the web request.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-intervalMilliseconds <Int32>

The interval in milliseconds to wait to repeat the request.



Required? true

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-maximumNumberOfCalls <Int32>

The number of requests to make before declaring that the call has failed.



Required? true

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-returnUnsuccessfulResponseObject [<SwitchParameter>]

Select whether to return an unsuccessful response object.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS





RELATED LINKS