How can I make a function to call RESTful api through NSURLSESSION that can be used on every controller in swift iOS i.e. singleton object for everywhere in app This is the Code I came up with. But as soon as i call the method it crashes cause till return statement the jsonresponse is empty.How can I make a function to call RESTful api t