{"action":"created","comment":{"url":"https://api.github.com/repos/rangle/ngcourse/pulls/comments/23575761","id":23575761,"diff_hunk":"@@ -1,33 +1,189 @@\n # Part 5. Making HTTP Requests.\n \n-After setting up a basic view we will set up the app to receive data from the\n-server using `$http.get`. To avoid doing server interaction in the controller,\n-we will start writing custom services using Angular’s `.factory()` method.\n-Server interaction introduces *asynchronicity*, so we look at *promises*,\n-which is currently the preferred approach to handling asynchronous code in\n-JavaScript. We will look at *chaining* promises, a well as error handling. In\n-addition to reusing promises created by `$http.get`, we will also create our\n-own using `$q`. We will also consider use of promises in `$timeout` and\n-`$interval`.\n+Most AngularJS apps will need to interact with a backend system to achieve\n+their objectives. By far the most common protocol for this is HTTP (or,\n+preferrably, it's secure version, HTTPS). While this is the same protocol that\n+was employed by the previous generation of web applications, it tends to be\n+used rather differently in a context of a modern single-page application\n+framework such as AngularJS.\n \n-## Talking to a Rest Server via Postman\n+## Talking to a RESTful Server via Postman\n \n-Before we begin talking to the server, let's get comfortable interacting with\n-the REST API using Postman.\n+In most cases, the Angular application and the server would not be exchanging","path":"handout/05-rest-apis.md","position":24,"original_position":24,"commit_id":"36fe70b5e4c96a037cdc5b303179fc63f7db8cb5","original_commit_id":"36fe70b5e4c96a037cdc5b303179fc63f7db8cb5","user":{"login":"SethDavenport","id":4614141,"avatar_url":"https://avatars.githubusercontent.com/u/4614141?v=3","gravatar_id":"","url":"https://api.github.com/users/SethDavenport","html_url":"https://github.com/SethDavenport","followers_url":"https://api.github.com/users/SethDavenport/followers","following_url":"https://api.github.com/users/SethDavenport/following{/other_user}","gists_url":"https://api.github.com/users/SethDavenport/gists{/gist_id}","starred_url":"https://api.github.com/users/SethDavenport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SethDavenport/subscriptions","organizations_url":"https://api.github.com/users/SethDavenport/orgs","repos_url":"https://api.github.com/users/SethDavenport/repos","events_url":"https://api.github.com/users/SethDavenport/events{/privacy}","received_events_url":"https://api.github.com/users/SethDavenport/received_events","type":"User","site_admin":false},"body":"will not be","created_at":"2015-01-26T23:51:32Z","updated_at":"2015-01-26T23:51:32Z","html_url":"https://github.com/rangle/ngcourse/pull/34#discussion_r23575761","pull_request_url":"https://api.github.com/repos/rangle/ngcourse/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/rangle/ngcourse/pulls/comments/23575761"},"html":{"href":"https://github.com/rangle/ngcourse/pull/34#discussion_r23575761"},"pull_request":{"href":"https://api.github.com/repos/rangle/ngcourse/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/rangle/ngcourse/pulls/34","id":28004752,"html_url":"https://github.com/rangle/ngcourse/pull/34","diff_url":"https://github.com/rangle/ngcourse/pull/34.diff","patch_url":"https://github.com/rangle/ngcourse/pull/34.patch","issue_url":"https://api.github.com/repos/rangle/ngcourse/issues/34","number":34,"state":"closed","locked":false,"title":"Expanding HTTP section.","user":{"login":"yuri","id":2119,"avatar_url":"https://avatars.githubusercontent.com/u/2119?v=3","gravatar_id":"","url":"https://api.github.com/users/yuri","html_url":"https://github.com/yuri","followers_url":"https://api.github.com/users/yuri/followers","following_url":"https://api.github.com/users/yuri/following{/other_user}","gists_url":"https://api.github.com/users/yuri/gists{/gist_id}","starred_url":"https://api.github.com/users/yuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuri/subscriptions","organizations_url":"https://api.github.com/users/yuri/orgs","repos_url":"https://api.github.com/users/yuri/repos","events_url":"https://api.github.com/users/yuri/events{/privacy}","received_events_url":"https://api.github.com/users/yuri/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-26T03:48:01Z","updated_at":"2015-01-26T23:51:32Z","closed_at":"2015-01-26T04:09:04Z","merged_at":"2015-01-26T04:09:04Z","merge_commit_sha":"7398a02555b2105253b40f3b7d55ff4ceab2a7b6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rangle/ngcourse/pulls/34/commits","review_comments_url":"https://api.github.com/repos/rangle/ngcourse/pulls/34/comments","review_comment_url":"https://api.github.com/repos/rangle/ngcourse/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rangle/ngcourse/issues/34/comments","statuses_url":"https://api.github.com/repos/rangle/ngcourse/statuses/36fe70b5e4c96a037cdc5b303179fc63f7db8cb5","head":{"label":"yuri:feat-expand-rest-section","ref":"feat-expand-rest-section","sha":"36fe70b5e4c96a037cdc5b303179fc63f7db8cb5","user":{"login":"yuri","id":2119,"avatar_url":"https://avatars.githubusercontent.com/u/2119?v=3","gravatar_id":"","url":"https://api.github.com/users/yuri","html_url":"https://github.com/yuri","followers_url":"https://api.github.com/users/yuri/followers","following_url":"https://api.github.com/users/yuri/following{/other_user}","gists_url":"https://api.github.com/users/yuri/gists{/gist_id}","starred_url":"https://api.github.com/users/yuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuri/subscriptions","organizations_url":"https://api.github.com/users/yuri/orgs","repos_url":"https://api.github.com/users/yuri/repos","events_url":"https://api.github.com/users/yuri/events{/privacy}","received_events_url":"https://api.github.com/users/yuri/received_events","type":"User","site_admin":false},"repo":{"id":29686656,"name":"ngcourse","full_name":"yuri/ngcourse","owner":{"login":"yuri","id":2119,"avatar_url":"https://avatars.githubusercontent.com/u/2119?v=3","gravatar_id":"","url":"https://api.github.com/users/yuri","html_url":"https://github.com/yuri","followers_url":"https://api.github.com/users/yuri/followers","following_url":"https://api.github.com/users/yuri/following{/other_user}","gists_url":"https://api.github.com/users/yuri/gists{/gist_id}","starred_url":"https://api.github.com/users/yuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuri/subscriptions","organizations_url":"https://api.github.com/users/yuri/orgs","repos_url":"https://api.github.com/users/yuri/repos","events_url":"https://api.github.com/users/yuri/events{/privacy}","received_events_url":"https://api.github.com/users/yuri/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yuri/ngcourse","description":"An AngularJS Course from Rangle.io","fork":true,"url":"https://api.github.com/repos/yuri/ngcourse","forks_url":"https://api.github.com/repos/yuri/ngcourse/forks","keys_url":"https://api.github.com/repos/yuri/ngcourse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yuri/ngcourse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yuri/ngcourse/teams","hooks_url":"https://api.github.com/repos/yuri/ngcourse/hooks","issue_events_url":"https://api.github.com/repos/yuri/ngcourse/issues/events{/number}","events_url":"https://api.github.com/repos/yuri/ngcourse/events","assignees_url":"https://api.github.com/repos/yuri/ngcourse/assignees{/user}","branches_url":"https://api.github.com/repos/yuri/ngcourse/branches{/branch}","tags_url":"https://api.github.com/repos/yuri/ngcourse/tags","blobs_url":"https://api.github.com/repos/yuri/ngcourse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yuri/ngcourse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yuri/ngcourse/git/refs{/sha}","trees_url":"https://api.github.com/repos/yuri/ngcourse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yuri/ngcourse/statuses/{sha}","languages_url":"https://api.github.com/repos/yuri/ngcourse/languages","stargazers_url":"https://api.github.com/repos/yuri/ngcourse/stargazers","contributors_url":"https://api.github.com/repos/yuri/ngcourse/contributors","subscribers_url":"https://api.github.com/repos/yuri/ngcourse/subscribers","subscription_url":"https://api.github.com/repos/yuri/ngcourse/subscription","commits_url":"https://api.github.com/repos/yuri/ngcourse/commits{/sha}","git_commits_url":"https://api.github.com/repos/yuri/ngcourse/git/commits{/sha}","comments_url":"https://api.github.com/repos/yuri/ngcourse/comments{/number}","issue_comment_url":"https://api.github.com/repos/yuri/ngcourse/issues/comments/{number}","contents_url":"https://api.github.com/repos/yuri/ngcourse/contents/{+path}","compare_url":"https://api.github.com/repos/yuri/ngcourse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yuri/ngcourse/merges","archive_url":"https://api.github.com/repos/yuri/ngcourse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yuri/ngcourse/downloads","issues_url":"https://api.github.com/repos/yuri/ngcourse/issues{/number}","pulls_url":"https://api.github.com/repos/yuri/ngcourse/pulls{/number}","milestones_url":"https://api.github.com/repos/yuri/ngcourse/milestones{/number}","notifications_url":"https://api.github.com/repos/yuri/ngcourse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yuri/ngcourse/labels{/name}","releases_url":"https://api.github.com/repos/yuri/ngcourse/releases{/id}","created_at":"2015-01-22T15:58:56Z","updated_at":"2015-01-22T15:58:56Z","pushed_at":"2015-01-26T04:58:42Z","git_url":"git://github.com/yuri/ngcourse.git","ssh_url":"git@github.com:yuri/ngcourse.git","clone_url":"https://github.com/yuri/ngcourse.git","svn_url":"https://github.com/yuri/ngcourse","homepage":null,"size":2578,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rangle:master","ref":"master","sha":"4ace03eb2df8ceec8c9a7bd8928f5ad56191c0ca","user":{"login":"rangle","id":4304982,"avatar_url":"https://avatars.githubusercontent.com/u/4304982?v=3","gravatar_id":"","url":"https://api.github.com/users/rangle","html_url":"https://github.com/rangle","followers_url":"https://api.github.com/users/rangle/followers","following_url":"https://api.github.com/users/rangle/following{/other_user}","gists_url":"https://api.github.com/users/rangle/gists{/gist_id}","starred_url":"https://api.github.com/users/rangle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rangle/subscriptions","organizations_url":"https://api.github.com/users/rangle/orgs","repos_url":"https://api.github.com/users/rangle/repos","events_url":"https://api.github.com/users/rangle/events{/privacy}","received_events_url":"https://api.github.com/users/rangle/received_events","type":"Organization","site_admin":false},"repo":{"id":22566843,"name":"ngcourse","full_name":"rangle/ngcourse","owner":{"login":"rangle","id":4304982,"avatar_url":"https://avatars.githubusercontent.com/u/4304982?v=3","gravatar_id":"","url":"https://api.github.com/users/rangle","html_url":"https://github.com/rangle","followers_url":"https://api.github.com/users/rangle/followers","following_url":"https://api.github.com/users/rangle/following{/other_user}","gists_url":"https://api.github.com/users/rangle/gists{/gist_id}","starred_url":"https://api.github.com/users/rangle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rangle/subscriptions","organizations_url":"https://api.github.com/users/rangle/orgs","repos_url":"https://api.github.com/users/rangle/repos","events_url":"https://api.github.com/users/rangle/events{/privacy}","received_events_url":"https://api.github.com/users/rangle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rangle/ngcourse","description":"An AngularJS Course from Rangle.io","fork":false,"url":"https://api.github.com/repos/rangle/ngcourse","forks_url":"https://api.github.com/repos/rangle/ngcourse/forks","keys_url":"https://api.github.com/repos/rangle/ngcourse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rangle/ngcourse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rangle/ngcourse/teams","hooks_url":"https://api.github.com/repos/rangle/ngcourse/hooks","issue_events_url":"https://api.github.com/repos/rangle/ngcourse/issues/events{/number}","events_url":"https://api.github.com/repos/rangle/ngcourse/events","assignees_url":"https://api.github.com/repos/rangle/ngcourse/assignees{/user}","branches_url":"https://api.github.com/repos/rangle/ngcourse/branches{/branch}","tags_url":"https://api.github.com/repos/rangle/ngcourse/tags","blobs_url":"https://api.github.com/repos/rangle/ngcourse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rangle/ngcourse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rangle/ngcourse/git/refs{/sha}","trees_url":"https://api.github.com/repos/rangle/ngcourse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rangle/ngcourse/statuses/{sha}","languages_url":"https://api.github.com/repos/rangle/ngcourse/languages","stargazers_url":"https://api.github.com/repos/rangle/ngcourse/stargazers","contributors_url":"https://api.github.com/repos/rangle/ngcourse/contributors","subscribers_url":"https://api.github.com/repos/rangle/ngcourse/subscribers","subscription_url":"https://api.github.com/repos/rangle/ngcourse/subscription","commits_url":"https://api.github.com/repos/rangle/ngcourse/commits{/sha}","git_commits_url":"https://api.github.com/repos/rangle/ngcourse/git/commits{/sha}","comments_url":"https://api.github.com/repos/rangle/ngcourse/comments{/number}","issue_comment_url":"https://api.github.com/repos/rangle/ngcourse/issues/comments/{number}","contents_url":"https://api.github.com/repos/rangle/ngcourse/contents/{+path}","compare_url":"https://api.github.com/repos/rangle/ngcourse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rangle/ngcourse/merges","archive_url":"https://api.github.com/repos/rangle/ngcourse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rangle/ngcourse/downloads","issues_url":"https://api.github.com/repos/rangle/ngcourse/issues{/number}","pulls_url":"https://api.github.com/repos/rangle/ngcourse/pulls{/number}","milestones_url":"https://api.github.com/repos/rangle/ngcourse/milestones{/number}","notifications_url":"https://api.github.com/repos/rangle/ngcourse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rangle/ngcourse/labels{/name}","releases_url":"https://api.github.com/repos/rangle/ngcourse/releases{/id}","created_at":"2014-08-03T04:01:03Z","updated_at":"2015-01-26T23:08:34Z","pushed_at":"2015-01-26T23:08:33Z","git_url":"git://github.com/rangle/ngcourse.git","ssh_url":"git@github.com:rangle/ngcourse.git","clone_url":"https://github.com/rangle/ngcourse.git","svn_url":"https://github.com/rangle/ngcourse","homepage":null,"size":3101,"stargazers_count":21,"watchers_count":21,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":2,"forks":8,"open_issues":2,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rangle/ngcourse/pulls/34"},"html":{"href":"https://github.com/rangle/ngcourse/pull/34"},"issue":{"href":"https://api.github.com/repos/rangle/ngcourse/issues/34"},"comments":{"href":"https://api.github.com/repos/rangle/ngcourse/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/rangle/ngcourse/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/rangle/ngcourse/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rangle/ngcourse/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/rangle/ngcourse/statuses/36fe70b5e4c96a037cdc5b303179fc63f7db8cb5"}}}}