Get-GitHubLastResponse

SYNOPSIS

Gets the metadata of the last GitHub API response

SYNTAX

__AllParameterSets

Get-GitHubLastResponse

ALIASES

This cmdlet has the following aliases,

  • Get-GHLastResponse

DESCRIPTION

The Get-GitHubLastResponse function returns the details of the last HTTP response received by Invoke-GitHubRequest (including failed requests)

Properties: StatusCode, Method, Uri, RequestId, Timestamp, Headers & RateLimit (Limit, Remaining, Used, Reset as a UTC DateTime, Resource)

Returns nothing when no request has been made yet

EXAMPLES

EXAMPLE 1

Get-GitHubLastResponse

Returns the last response metadata

EXAMPLE 2

(Get-GitHubLastResponse).RateLimit.Remaining

Returns the number of requests left in the current rate limit window

PARAMETERS

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Aliases: Get-GHLastResponse