RedditOAuthResponse
about_RedditOAuthResponse
SHORT DESCRIPTION
Describes the RedditOAuthResponse Class
LONG DESCRIPTION
The RedditOAuthResponse
Class encapsulates the responses from Reddit OAuth grant flows.
The RedditOAuthResponse
class is imported automatically when you import the PSRAW module.
Constructors
RedditOAuthResponse()
Default Constructor creates an empty RedditOAuthResponse
object.
[RedditOAuthResponse]::new()
Properties
Content
The Content returned from the Reddit. It may be either plain text or an object created from JSON.
Name: Content
Type: System.Management.Automation.PSObject
Hidden: False
Static: False
ContentType
The Content-Type
response header returned from Reddit.
Name: ContentType
Type: String
Hidden: False
Static: False
Parameters
The parameters that were passed to Invoke-WebRequest
.
Name: Parameters
Type: System.Collections.Hashtable
Hidden: False
Static: False
RequestDate
The date the request was made.
Name: RequestDate
Type: DateTime
Hidden: False
Static: False
Response
The Microsoft.PowerShell.Commands.BasicHtmlWebResponseObject
or Microsoft.PowerShell.Commands.HtmlWebResponseObject
returned from Invoke-WebRequest
Name: Response
Type: Microsoft.PowerShell.Commands.WebResponseObject
Hidden: False
Static: False
Methods
EXAMPLES
Example 1
[RedditOAuthResponse]@{
Response = $Response
RequestDate = $Response.Headers.Date[0]
Parameters = $Params
Content = $Response.Content
ContentType = $Response | Get-HttpResponseContentType
}
This is an example of how the RedditOAuthResponse
class is used in Request-RedditOAuthTokenPassword
.
SEE ALSO
Request-RedditOAuthTokenClient
Request-RedditOAuthTokenInstalled
Request-RedditOAuthTokenPassword