{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_137/pulls/comments/66024689","id":66024689,"diff_hunk":"@@ -0,0 +1,50 @@\n+//\n+//  NetworkConnection.m\n+//  Elearning\n+//\n+\n+#import \"NetworkConnection.h\"\n+\n+@implementation NetworkConnection\n+\n++ (void) responseWithUrl:(NSString*)url\n+                  method:(NSString*)method\n+                  params:(NSString*)params\n+           resultRequest:(ResultRequest)complete\n+{\n+    NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];\n+    \n+    if ([method isEqualToString:@\"GET\"]) {\n+        // GET method\n+        [request setURL:[NSURL URLWithString:[NSString stringWithFormat:@\"%@?%@\",url,params]]];\n+        request.HTTPMethod = @\"GET\";\n+    } else {\n+        // POST, DELETE, PATCH method\n+        [request setURL:[NSURL URLWithString:url]];\n+        NSString * post = params;\n+        NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];\n+        NSString *postLength = [NSString stringWithFormat:@\"%lu\",(unsigned long)[postData length]];","path":"Elearning/Elearning/Network/NetworkConnection.m","position":26,"original_position":26,"commit_id":"057b79ea89a2a9cd7458b3214739281cae87bc69","original_commit_id":"057b79ea89a2a9cd7458b3214739281cae87bc69","user":{"login":"quocnb","id":4478445,"avatar_url":"https://avatars.githubusercontent.com/u/4478445?v=3","gravatar_id":"","url":"https://api.github.com/users/quocnb","html_url":"https://github.com/quocnb","followers_url":"https://api.github.com/users/quocnb/followers","following_url":"https://api.github.com/users/quocnb/following{/other_user}","gists_url":"https://api.github.com/users/quocnb/gists{/gist_id}","starred_url":"https://api.github.com/users/quocnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quocnb/subscriptions","organizations_url":"https://api.github.com/users/quocnb/orgs","repos_url":"https://api.github.com/users/quocnb/repos","events_url":"https://api.github.com/users/quocnb/events{/privacy}","received_events_url":"https://api.github.com/users/quocnb/received_events","type":"User","site_admin":false},"body":"tránh việc sử dụng dấu [, sử dụng . nếu có thể. Ví dụ : postData.length","created_at":"2016-06-07T07:56:38Z","updated_at":"2016-06-07T07:56:38Z","html_url":"https://github.com/framgia/fels_137/pull/19#discussion_r66024689","pull_request_url":"https://api.github.com/repos/framgia/fels_137/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_137/pulls/comments/66024689"},"html":{"href":"https://github.com/framgia/fels_137/pull/19#discussion_r66024689"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_137/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_137/pulls/19","id":72804834,"html_url":"https://github.com/framgia/fels_137/pull/19","diff_url":"https://github.com/framgia/fels_137/pull/19.diff","patch_url":"https://github.com/framgia/fels_137/pull/19.patch","issue_url":"https://api.github.com/repos/framgia/fels_137/issues/19","number":19,"state":"open","locked":false,"title":"Code class NetworkConnection and ParseJson","user":{"login":"nguyenvanthieub","id":19147410,"avatar_url":"https://avatars.githubusercontent.com/u/19147410?v=3","gravatar_id":"","url":"https://api.github.com/users/nguyenvanthieub","html_url":"https://github.com/nguyenvanthieub","followers_url":"https://api.github.com/users/nguyenvanthieub/followers","following_url":"https://api.github.com/users/nguyenvanthieub/following{/other_user}","gists_url":"https://api.github.com/users/nguyenvanthieub/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenvanthieub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenvanthieub/subscriptions","organizations_url":"https://api.github.com/users/nguyenvanthieub/orgs","repos_url":"https://api.github.com/users/nguyenvanthieub/repos","events_url":"https://api.github.com/users/nguyenvanthieub/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenvanthieub/received_events","type":"User","site_admin":false},"body":"Code class xử lý liên quan tới mạng\r\n- Class NetworkConnection xử lý các phương thức: GET, POST, PATCH, DELETE\r\n- Class ParseJson xử lý Parse Json","created_at":"2016-06-07T01:52:35Z","updated_at":"2016-06-07T07:56:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f337e51f17ba61688536a398e547fe4c27fc04d5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_137/pulls/19/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_137/pulls/19/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_137/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_137/issues/19/comments","statuses_url":"https://api.github.com/repos/framgia/fels_137/statuses/057b79ea89a2a9cd7458b3214739281cae87bc69","head":{"label":"nguyenvanthieub:64768_code_network","ref":"64768_code_network","sha":"057b79ea89a2a9cd7458b3214739281cae87bc69","user":{"login":"nguyenvanthieub","id":19147410,"avatar_url":"https://avatars.githubusercontent.com/u/19147410?v=3","gravatar_id":"","url":"https://api.github.com/users/nguyenvanthieub","html_url":"https://github.com/nguyenvanthieub","followers_url":"https://api.github.com/users/nguyenvanthieub/followers","following_url":"https://api.github.com/users/nguyenvanthieub/following{/other_user}","gists_url":"https://api.github.com/users/nguyenvanthieub/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenvanthieub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenvanthieub/subscriptions","organizations_url":"https://api.github.com/users/nguyenvanthieub/orgs","repos_url":"https://api.github.com/users/nguyenvanthieub/repos","events_url":"https://api.github.com/users/nguyenvanthieub/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenvanthieub/received_events","type":"User","site_admin":false},"repo":{"id":59173881,"name":"fels_137","full_name":"nguyenvanthieub/fels_137","owner":{"login":"nguyenvanthieub","id":19147410,"avatar_url":"https://avatars.githubusercontent.com/u/19147410?v=3","gravatar_id":"","url":"https://api.github.com/users/nguyenvanthieub","html_url":"https://github.com/nguyenvanthieub","followers_url":"https://api.github.com/users/nguyenvanthieub/followers","following_url":"https://api.github.com/users/nguyenvanthieub/following{/other_user}","gists_url":"https://api.github.com/users/nguyenvanthieub/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenvanthieub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenvanthieub/subscriptions","organizations_url":"https://api.github.com/users/nguyenvanthieub/orgs","repos_url":"https://api.github.com/users/nguyenvanthieub/repos","events_url":"https://api.github.com/users/nguyenvanthieub/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenvanthieub/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nguyenvanthieub/fels_137","description":"Framgia E-Learning System (training)","fork":true,"url":"https://api.github.com/repos/nguyenvanthieub/fels_137","forks_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/forks","keys_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/teams","hooks_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/hooks","issue_events_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/issues/events{/number}","events_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/events","assignees_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/assignees{/user}","branches_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/branches{/branch}","tags_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/tags","blobs_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/git/refs{/sha}","trees_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/statuses/{sha}","languages_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/languages","stargazers_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/stargazers","contributors_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/contributors","subscribers_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/subscribers","subscription_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/subscription","commits_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/commits{/sha}","git_commits_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/git/commits{/sha}","comments_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/comments{/number}","issue_comment_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/issues/comments{/number}","contents_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/contents/{+path}","compare_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/merges","archive_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/downloads","issues_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/issues{/number}","pulls_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/pulls{/number}","milestones_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/milestones{/number}","notifications_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/labels{/name}","releases_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/releases{/id}","deployments_url":"https://api.github.com/repos/nguyenvanthieub/fels_137/deployments","created_at":"2016-05-19T04:33:50Z","updated_at":"2016-05-18T07:44:05Z","pushed_at":"2016-06-07T07:04:49Z","git_url":"git://github.com/nguyenvanthieub/fels_137.git","ssh_url":"git@github.com:nguyenvanthieub/fels_137.git","clone_url":"https://github.com/nguyenvanthieub/fels_137.git","svn_url":"https://github.com/nguyenvanthieub/fels_137","homepage":null,"size":194,"stargazers_count":0,"watchers_count":0,"language":null,"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":"framgia:develop","ref":"develop","sha":"8f14d38685ceb78ae2d0c319f80c12d7a276aafe","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":59093360,"name":"fels_137","full_name":"framgia/fels_137","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/fels_137","description":"Framgia E-Learning System (training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_137","forks_url":"https://api.github.com/repos/framgia/fels_137/forks","keys_url":"https://api.github.com/repos/framgia/fels_137/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_137/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_137/teams","hooks_url":"https://api.github.com/repos/framgia/fels_137/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_137/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_137/events","assignees_url":"https://api.github.com/repos/framgia/fels_137/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_137/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_137/tags","blobs_url":"https://api.github.com/repos/framgia/fels_137/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_137/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_137/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_137/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_137/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_137/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_137/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_137/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_137/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_137/subscription","commits_url":"https://api.github.com/repos/framgia/fels_137/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_137/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_137/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_137/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_137/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_137/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_137/merges","archive_url":"https://api.github.com/repos/framgia/fels_137/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_137/downloads","issues_url":"https://api.github.com/repos/framgia/fels_137/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_137/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_137/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_137/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_137/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_137/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/fels_137/deployments","created_at":"2016-05-18T07:44:05Z","updated_at":"2016-05-18T07:44:05Z","pushed_at":"2016-06-07T07:10:07Z","git_url":"git://github.com/framgia/fels_137.git","ssh_url":"git@github.com:framgia/fels_137.git","clone_url":"https://github.com/framgia/fels_137.git","svn_url":"https://github.com/framgia/fels_137","homepage":null,"size":202,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":5,"forks":2,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_137/pulls/19"},"html":{"href":"https://github.com/framgia/fels_137/pull/19"},"issue":{"href":"https://api.github.com/repos/framgia/fels_137/issues/19"},"comments":{"href":"https://api.github.com/repos/framgia/fels_137/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_137/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_137/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_137/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_137/statuses/057b79ea89a2a9cd7458b3214739281cae87bc69"}}}}
{"actor":{"display_login":"quocnb"}}