I am trying to us a RESTful API that returns some json data. I want to encapsulate the code that creates the HTTP Request and sets the headers in its own method so I can cal
as you see here, the dataTaskWithRequest:completionHandler: has a completion handler with no expected return value.

that means the NSURLSession instance do not expect any value from you to proceed after calling this method; with other words: you completion closure (or block, if you like) ends the procedure here.
there is not clear why you'd like sending back anything to the caller via the completion handler.