https GET api.github.com None /gists/2729810 {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} null 200 [('status', '200 OK'), ('x-ratelimit-remaining', '4970'), ('content-length', '3280'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"b01fb6ac81527f99db9f6f586b048ee3"'), ('date', 'Sat, 19 May 2012 06:58:15 GMT'), ('content-type', 'application/json; charset=utf-8')] {"updated_at":"2012-02-29T16:47:12Z","forks":[],"url":"https://api.github.com/gists/2729810","comments":0,"public":true,"git_pull_url":"git://gist.github.com/2729810.git","files":{"fail_github.py":{"type":"application/python","raw_url":"https://gist.github.com/raw/2729810/2fb3aa84e0efa50dc0f4c18b5df5b7b9ab27076b/fail_github.py","size":1636,"filename":"fail_github.py","content":"import httplib\nimport base64\nimport json\n\nlogin = \"\"\npassword = \"\"\norgName = \"\"\nrepoName = \"FailGithubApi\"\n\ndef doRequest( verb, url, input ):\n input = json.dumps( input )\n cnx = httplib.HTTPSConnection( \"api.github.com\", strict = True )\n cnx.request( verb, url, input, { \"Authorization\" : \"Basic \" + base64.b64encode( login + \":\" + password ).replace( '\\n', '' ) } )\n response = cnx.getresponse()\n status = response.status\n output = response.read()\n cnx.close()\n print verb, url, input, \"=>\", status, output\n print\n if status < 200 or status >= 300:\n exit( 1 )\n return json.loads( output )\n\n# Create a repo\ndoRequest( \"POST\", \"/user/repos\", { \"name\": repoName } )\n\n# Create a blob, a tree, a commit and the master branch\nb = doRequest(\n \"POST\", \"/repos/%s/%s/git/blobs\" % ( login, repoName ),\n { \"content\": \"Content of the blob\", \"encoding\": \"latin1\" }\n)\nt = doRequest(\n \"POST\", \"/repos/%s/%s/git/trees\" % ( login, repoName ),\n { \"tree\" : [ { \"path\": \"foo.bar\", \"type\": \"blob\", \"mode\": \"100644\", \"sha\": b[\"sha\"] } ] }\n)\nc = doRequest(\n \"POST\", \"/repos/%s/%s/git/commits\" % ( login, repoName ),\n { \"parents\": [], \"message\": \"Message of the commit\", \"tree\": t[\"sha\"] }\n)\ndoRequest(\n \"POST\", \"/repos/%s/%s/git/refs\" % ( login, repoName ),\n { \"ref\": \"refs/heads/master\", \"sha\": c[\"sha\"] }\n)\n\n# Fork the repo\ndoRequest( \"POST\", \"/repos/%s/%s/forks?org=%s\" % ( login, repoName, orgName ), None )\n\n# Create a new blob => BOOM error 500\ndoRequest(\n \"POST\", \"/repos/%s/%s/git/blobs\" % ( orgName, repoName ),\n { \"content\": \"Content of the new blob\", \"encoding\": \"latin1\" }\n)\n","language":"Python"}},"html_url":"https://gist.github.com/2729810","git_push_url":"git@gist.github.com:2729810.git","user":{"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"description":"How to error 500 Github API v3, as requested by Rick (GitHub Staff)","created_at":"2012-02-29T16:47:12Z","id":"2729810","history":[{"url":"https://api.github.com/gists/2729810/a40de483e42ba33bda308371c0ef8383db73be9e","change_status":{"deletions":0,"additions":52,"total":52},"committed_at":"2012-02-29T16:47:12Z","version":"a40de483e42ba33bda308371c0ef8383db73be9e","user":{"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146}}]} https PATCH api.github.com None /gists/2729810 {'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} {} 200 [('status', '200 OK'), ('x-ratelimit-remaining', '4998'), ('content-length', '1446'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"9d90688efdf43c600be9c6c068f007dd"'), ('date', 'Sat, 19 May 2012 07:03:55 GMT'), ('content-type', 'application/json; charset=utf-8')] {"updated_at":"2012-05-19T07:00:58Z","git_push_url":"git@gist.github.com:2729810.git","forks":[],"url":"https://api.github.com/gists/2729810","comments":0,"public":true,"files":{"foobar.txt":{"type":"text/plain","raw_url":"https://gist.github.com/raw/2729810/73a1c7f17aa0ad5d7cbb5a8ca033ce47d3d23197/foobar.txt","size":24,"filename":"foobar.txt","content":"File created by PyGithub","language":"Text"}},"html_url":"https://gist.github.com/2729810","user":{"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"description":"Gist created by PyGithub","created_at":"2012-05-19T07:00:58Z","id":"2729810","history":[{"url":"https://api.github.com/gists/2729810/35deb29ab1caf4c68c03d8244ad674b56de01a5c","version":"35deb29ab1caf4c68c03d8244ad674b56de01a5c","change_status":{"deletions":0,"additions":1,"total":1},"committed_at":"2012-05-19T07:00:58Z","user":{"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146}}],"git_pull_url":"git://gist.github.com/2729810.git"}