i am working on Rest API with Swift IOS coding. my problem is when i am requesting the data from controller its working but the when i created a class and calling the method created in that class, i am facing error, its redirecting two time in function and showing nil.i am working on Rest API with Swift IOS coding.