Skip to content

Instantly share code, notes, and snippets.

@nickfloyd
Created June 25, 2011 14:11

Revisions

  1. Nick Floyd revised this gist Jun 26, 2011. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion gistfile1.bas
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    //This returns a 404 not found - powershell
    //This returns a 404 not found - powershell; I expected a 401 if my creds were bad
    $Url = "https://github.com/api/v2/xml/commits/list/fellowshiptech/portal/Portal_2011.6.23_15-26"
    $webclient = new-object system.net.webclient
    $webclient.credentials = new-object system.net.networkcredential("user", "password")
    @@ -8,3 +8,8 @@ $result
    //This returns the data I want via terminal
    curl -u user:password https://github.com/api/v2/xml/commits/list/fellowshiptech/portal/Portal_2011.6.23_15-26

    //Here's how to do it via powershell - though I am not a fan of the implementation
    $webclient = new-object system.net.webclient
    $result = $webclient.DownloadString("https://github.com/api/v2/xml/commits/list/fellowshiptech/portal/Portal_2011.6.23_15-26?login=:user&token=:token")
    $result

  2. Nick Floyd renamed this gist Jun 25, 2011. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. Nick Floyd created this gist Jun 25, 2011.
    10 changes: 10 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    //This returns a 404 not found - powershell
    $Url = "https://github.com/api/v2/xml/commits/list/fellowshiptech/portal/Portal_2011.6.23_15-26"
    $webclient = new-object system.net.webclient
    $webclient.credentials = new-object system.net.networkcredential("user", "password")
    $result = $webclient.DownloadString($Url)
    $result

    //This returns the data I want via terminal
    curl -u user:password https://github.com/api/v2/xml/commits/list/fellowshiptech/portal/Portal_2011.6.23_15-26