http protocol
Converts an http[s] protocol command to PowerShell.
{
https://api.github.com/repos/StartAutomating/PipeScript
}{
get https://api.github.com/repos/StartAutomating/PipeScript
} | .>PipeScriptInvoke-PipeScript {
$GitHubApi = 'api.github.com'
$UserName = 'StartAutomating'
https://$GitHubApi/users/$UserName
}-ScriptBlock {
https://$GitHubApi/users/$UserName -GitHubApi api.github.com -UserName StartAutomating
}-ScriptBlock {
https://$GitHubApi/users/$UserName -GitHubApi api.github.com -UserName StartAutomating
}-ScriptBlock {
@(foreach ($repo in https://api.github.com/users/StartAutomating/repos?per_page=100) {
$repo | .Name .Stars { $_.stargazers_count }
}) | Sort-Object Stars -Descending
}{
http://text-processing.com/api/sentiment/ -Method POST -ContentType 'application/x-www-form-urlencoded' -Body "text=amazing!" |
Select-Object -ExpandProperty Probability -Property Label
}The URI.
| Type | Required | Position | PipelineInput |
|---|---|---|---|
[Uri] |
true | 1 | true (ByValue) |
The Command's Abstract Syntax Tree
| Type | Required | Position | PipelineInput |
|---|---|---|---|
[CommandAst] |
true | 2 | false |
| Type | Required | Position | PipelineInput |
|---|---|---|---|
[String] |
false | 3 | false |
Http.Protocol [-CommandUri] <Uri> [-CommandAst] <CommandAst> [[-Method] <String>] [<CommonParameters>]