{"action":"created","comment":{"url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/pulls/comments/42251543","id":42251543,"diff_hunk":"@@ -138,6 +138,22 @@ NS_ASSUME_NONNULL_BEGIN\n                            statusCode:(int)statusCode\n                               headers:(nullable NSDictionary*)httpHeaders;\n \n+\n+/**\n+ *  Builds a response given a URL, the status code, and headers.\n+ *\n+ *  @param url         The URL for the data to reutrn in the response","path":"OHHTTPStubs/Sources/OHHTTPStubsResponse.h","position":8,"original_position":8,"commit_id":"0bbc0858ed5741304599fccfa2f3564c940599db","original_commit_id":"0bbc0858ed5741304599fccfa2f3564c940599db","user":{"login":"AliSoftware","id":216089,"avatar_url":"https://avatars.githubusercontent.com/u/216089?v=3","gravatar_id":"","url":"https://api.github.com/users/AliSoftware","html_url":"https://github.com/AliSoftware","followers_url":"https://api.github.com/users/AliSoftware/followers","following_url":"https://api.github.com/users/AliSoftware/following{/other_user}","gists_url":"https://api.github.com/users/AliSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/AliSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AliSoftware/subscriptions","organizations_url":"https://api.github.com/users/AliSoftware/orgs","repos_url":"https://api.github.com/users/AliSoftware/repos","events_url":"https://api.github.com/users/AliSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/AliSoftware/received_events","type":"User","site_admin":false},"body":"`reutrn`","created_at":"2015-10-16T14:55:22Z","updated_at":"2015-10-16T14:55:22Z","html_url":"https://github.com/AliSoftware/OHHTTPStubs/pull/129#discussion_r42251543","pull_request_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/pulls/129","_links":{"self":{"href":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/pulls/comments/42251543"},"html":{"href":"https://github.com/AliSoftware/OHHTTPStubs/pull/129#discussion_r42251543"},"pull_request":{"href":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/pulls/129"}}},"pull_request":{"url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/pulls/129","id":47859586,"html_url":"https://github.com/AliSoftware/OHHTTPStubs/pull/129","diff_url":"https://github.com/AliSoftware/OHHTTPStubs/pull/129.diff","patch_url":"https://github.com/AliSoftware/OHHTTPStubs/pull/129.patch","issue_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/issues/129","number":129,"state":"open","locked":false,"title":"Add methods to create `OHHTPStubResponse`s from `NSURL`s","user":{"login":"MaxGabriel","id":1274145,"avatar_url":"https://avatars.githubusercontent.com/u/1274145?v=3","gravatar_id":"","url":"https://api.github.com/users/MaxGabriel","html_url":"https://github.com/MaxGabriel","followers_url":"https://api.github.com/users/MaxGabriel/followers","following_url":"https://api.github.com/users/MaxGabriel/following{/other_user}","gists_url":"https://api.github.com/users/MaxGabriel/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxGabriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxGabriel/subscriptions","organizations_url":"https://api.github.com/users/MaxGabriel/orgs","repos_url":"https://api.github.com/users/MaxGabriel/repos","events_url":"https://api.github.com/users/MaxGabriel/events{/privacy}","received_events_url":"https://api.github.com/users/MaxGabriel/received_events","type":"User","site_admin":false},"body":"iOS 4 allowed using `NSURL`s instead of `NSString`s for file paths. This PR allows using `NSURL`s to create `OHHTPStubResponse`s, which provides better compatibility with test code already using `NSURL`s.\r\n\r\nI copied each test using `responseWithFileAtPath:statusCode:headers:` and used `responseWithURL:statusCode:headers:` there instead. This ends up duplicating a lot of code, but I know some people prefer that for tests, and this seemed in line with the existing tests.\r\n\r\nAn alternate implementation of this PR could be to implement the `NSURL` methods in terms of `NSString` based file paths, or vice versa.","created_at":"2015-10-16T00:40:03Z","updated_at":"2015-10-16T14:55:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c9e712b102021d6c5023eb6fc50804a2d5750eda","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/pulls/129/commits","review_comments_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/pulls/129/comments","review_comment_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/issues/129/comments","statuses_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/statuses/0bbc0858ed5741304599fccfa2f3564c940599db","head":{"label":"MaxGabriel:urlBasedStubResponses","ref":"urlBasedStubResponses","sha":"0bbc0858ed5741304599fccfa2f3564c940599db","user":{"login":"MaxGabriel","id":1274145,"avatar_url":"https://avatars.githubusercontent.com/u/1274145?v=3","gravatar_id":"","url":"https://api.github.com/users/MaxGabriel","html_url":"https://github.com/MaxGabriel","followers_url":"https://api.github.com/users/MaxGabriel/followers","following_url":"https://api.github.com/users/MaxGabriel/following{/other_user}","gists_url":"https://api.github.com/users/MaxGabriel/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxGabriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxGabriel/subscriptions","organizations_url":"https://api.github.com/users/MaxGabriel/orgs","repos_url":"https://api.github.com/users/MaxGabriel/repos","events_url":"https://api.github.com/users/MaxGabriel/events{/privacy}","received_events_url":"https://api.github.com/users/MaxGabriel/received_events","type":"User","site_admin":false},"repo":{"id":17554467,"name":"OHHTTPStubs","full_name":"MaxGabriel/OHHTTPStubs","owner":{"login":"MaxGabriel","id":1274145,"avatar_url":"https://avatars.githubusercontent.com/u/1274145?v=3","gravatar_id":"","url":"https://api.github.com/users/MaxGabriel","html_url":"https://github.com/MaxGabriel","followers_url":"https://api.github.com/users/MaxGabriel/followers","following_url":"https://api.github.com/users/MaxGabriel/following{/other_user}","gists_url":"https://api.github.com/users/MaxGabriel/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxGabriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxGabriel/subscriptions","organizations_url":"https://api.github.com/users/MaxGabriel/orgs","repos_url":"https://api.github.com/users/MaxGabriel/repos","events_url":"https://api.github.com/users/MaxGabriel/events{/privacy}","received_events_url":"https://api.github.com/users/MaxGabriel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MaxGabriel/OHHTTPStubs","description":"Stub your network requests easily! Test your apps with fake network data and custom response time, response code and headers!","fork":true,"url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs","forks_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/forks","keys_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/teams","hooks_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/hooks","issue_events_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/issues/events{/number}","events_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/events","assignees_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/assignees{/user}","branches_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/branches{/branch}","tags_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/tags","blobs_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/git/refs{/sha}","trees_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/statuses/{sha}","languages_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/languages","stargazers_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/stargazers","contributors_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/contributors","subscribers_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/subscribers","subscription_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/subscription","commits_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/commits{/sha}","git_commits_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/git/commits{/sha}","comments_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/comments{/number}","issue_comment_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/issues/comments{/number}","contents_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/contents/{+path}","compare_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/merges","archive_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/downloads","issues_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/issues{/number}","pulls_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/pulls{/number}","milestones_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/milestones{/number}","notifications_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/labels{/name}","releases_url":"https://api.github.com/repos/MaxGabriel/OHHTTPStubs/releases{/id}","created_at":"2014-03-09T00:36:06Z","updated_at":"2014-03-09T19:52:32Z","pushed_at":"2015-10-16T00:32:11Z","git_url":"git://github.com/MaxGabriel/OHHTTPStubs.git","ssh_url":"git@github.com:MaxGabriel/OHHTTPStubs.git","clone_url":"https://github.com/MaxGabriel/OHHTTPStubs.git","svn_url":"https://github.com/MaxGabriel/OHHTTPStubs","homepage":"","size":601,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","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":"AliSoftware:master","ref":"master","sha":"ee1786da196e2d5cc5e761c7b8ef0a832034305b","user":{"login":"AliSoftware","id":216089,"avatar_url":"https://avatars.githubusercontent.com/u/216089?v=3","gravatar_id":"","url":"https://api.github.com/users/AliSoftware","html_url":"https://github.com/AliSoftware","followers_url":"https://api.github.com/users/AliSoftware/followers","following_url":"https://api.github.com/users/AliSoftware/following{/other_user}","gists_url":"https://api.github.com/users/AliSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/AliSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AliSoftware/subscriptions","organizations_url":"https://api.github.com/users/AliSoftware/orgs","repos_url":"https://api.github.com/users/AliSoftware/repos","events_url":"https://api.github.com/users/AliSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/AliSoftware/received_events","type":"User","site_admin":false},"repo":{"id":4975026,"name":"OHHTTPStubs","full_name":"AliSoftware/OHHTTPStubs","owner":{"login":"AliSoftware","id":216089,"avatar_url":"https://avatars.githubusercontent.com/u/216089?v=3","gravatar_id":"","url":"https://api.github.com/users/AliSoftware","html_url":"https://github.com/AliSoftware","followers_url":"https://api.github.com/users/AliSoftware/followers","following_url":"https://api.github.com/users/AliSoftware/following{/other_user}","gists_url":"https://api.github.com/users/AliSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/AliSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AliSoftware/subscriptions","organizations_url":"https://api.github.com/users/AliSoftware/orgs","repos_url":"https://api.github.com/users/AliSoftware/repos","events_url":"https://api.github.com/users/AliSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/AliSoftware/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AliSoftware/OHHTTPStubs","description":"Stub your network requests easily! Test your apps with fake network data and custom response time, response code and headers!","fork":false,"url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs","forks_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/forks","keys_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/teams","hooks_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/hooks","issue_events_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/issues/events{/number}","events_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/events","assignees_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/assignees{/user}","branches_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/branches{/branch}","tags_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/tags","blobs_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/git/refs{/sha}","trees_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/statuses/{sha}","languages_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/languages","stargazers_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/stargazers","contributors_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/contributors","subscribers_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/subscribers","subscription_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/subscription","commits_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/commits{/sha}","git_commits_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/git/commits{/sha}","comments_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/comments{/number}","issue_comment_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/issues/comments{/number}","contents_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/contents/{+path}","compare_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/merges","archive_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/downloads","issues_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/issues{/number}","pulls_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/pulls{/number}","milestones_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/milestones{/number}","notifications_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/labels{/name}","releases_url":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/releases{/id}","created_at":"2012-07-10T14:18:37Z","updated_at":"2015-10-16T14:45:08Z","pushed_at":"2015-10-16T00:40:04Z","git_url":"git://github.com/AliSoftware/OHHTTPStubs.git","ssh_url":"git@github.com:AliSoftware/OHHTTPStubs.git","clone_url":"https://github.com/AliSoftware/OHHTTPStubs.git","svn_url":"https://github.com/AliSoftware/OHHTTPStubs","homepage":"","size":3397,"stargazers_count":1782,"watchers_count":1782,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":187,"mirror_url":null,"open_issues_count":7,"forks":187,"open_issues":7,"watchers":1782,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/pulls/129"},"html":{"href":"https://github.com/AliSoftware/OHHTTPStubs/pull/129"},"issue":{"href":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/issues/129"},"comments":{"href":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/issues/129/comments"},"review_comments":{"href":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/pulls/129/comments"},"review_comment":{"href":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/pulls/129/commits"},"statuses":{"href":"https://api.github.com/repos/AliSoftware/OHHTTPStubs/statuses/0bbc0858ed5741304599fccfa2f3564c940599db"}}}}