{"action":"created","issue":{"url":"https://api.github.com/repos/uroboro/mLexis/issues/1","repository_url":"https://api.github.com/repos/uroboro/mLexis","labels_url":"https://api.github.com/repos/uroboro/mLexis/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/uroboro/mLexis/issues/1/comments","events_url":"https://api.github.com/repos/uroboro/mLexis/issues/1/events","html_url":"https://github.com/uroboro/mLexis/issues/1","id":311710782,"number":1,"title":"Hi,uroboro,How to hook block?","user":{"login":"lzyroot","id":11453465,"avatar_url":"https://avatars3.githubusercontent.com/u/11453465?v=4","gravatar_id":"","url":"https://api.github.com/users/lzyroot","html_url":"https://github.com/lzyroot","followers_url":"https://api.github.com/users/lzyroot/followers","following_url":"https://api.github.com/users/lzyroot/following{/other_user}","gists_url":"https://api.github.com/users/lzyroot/gists{/gist_id}","starred_url":"https://api.github.com/users/lzyroot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzyroot/subscriptions","organizations_url":"https://api.github.com/users/lzyroot/orgs","repos_url":"https://api.github.com/users/lzyroot/repos","events_url":"https://api.github.com/users/lzyroot/events{/privacy}","received_events_url":"https://api.github.com/users/lzyroot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-05T17:58:18Z","updated_at":"2018-04-07T02:45:27Z","closed_at":null,"author_association":"NONE","body":"How to hook block?\r\n\r\n```\r\nAFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithBaseURL:baseURL];\r\n    manager.responseSerializer = [AFJSONResponseSerializer serializer];\r\n\r\n[manager POST:@\"https://github.com\" parameters:parameters success:^(NSURLSessionDataTask *task, id **responseObject**) {\r\n            \r\n        \r\n       \r\n } failure:^(NSURLSessionDataTask *task, NSError *error) {\r\n  }];\r\n```\r\n\r\n\r\n**responseObject is a NSDictionary,I want to change a value in the dictionary**\r\n\r\n```\r\n%hook AFHTTPSessionManager\r\n- (NSURLSessionDataTask *)POST:(NSString *)URLString\r\n                    parameters:(id)parameters\r\n                       success:(void (^)(NSURLSessionDataTask *task, id responseObject))success\r\n                       failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure\r\n\r\n\r\n//NSLog(@\"URLString : %@  parameters : %@ success : %@ failure : %@\",URLString,parameters,success,failure);\r\n\r\n\r\nreturn %orig;\r\n}\r\n%end\r\n```\r\n\r\n\r\nThank you!"},"comment":{"url":"https://api.github.com/repos/uroboro/mLexis/issues/comments/379426823","html_url":"https://github.com/uroboro/mLexis/issues/1#issuecomment-379426823","issue_url":"https://api.github.com/repos/uroboro/mLexis/issues/1","id":379426823,"user":{"login":"uroboro","id":1142354,"avatar_url":"https://avatars2.githubusercontent.com/u/1142354?v=4","gravatar_id":"","url":"https://api.github.com/users/uroboro","html_url":"https://github.com/uroboro","followers_url":"https://api.github.com/users/uroboro/followers","following_url":"https://api.github.com/users/uroboro/following{/other_user}","gists_url":"https://api.github.com/users/uroboro/gists{/gist_id}","starred_url":"https://api.github.com/users/uroboro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uroboro/subscriptions","organizations_url":"https://api.github.com/users/uroboro/orgs","repos_url":"https://api.github.com/users/uroboro/repos","events_url":"https://api.github.com/users/uroboro/events{/privacy}","received_events_url":"https://api.github.com/users/uroboro/received_events","type":"User","site_admin":false},"created_at":"2018-04-07T02:45:27Z","updated_at":"2018-04-07T02:45:27Z","author_association":"OWNER","body":"Though this isn't the place to ask, I'll answer anyway.\r\n\r\nWhat you have to do is call the original function with your own blocks. In the `success` block you made, you modify the dictionary and then call the original blocks with the modifications you made."}}
{"actor":{"display_login":"uroboro"}}