so I want to have a class that does all the http requests so I don’t have to copy the same code over and over. How can I make an http request to the http class and receive the response in the class I made the request from?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You will want to set the class (class A) as the delegate of the class that is actually triggering the http requests (class B). You create an instance of the method of class B, call your method, and have your method send a notification and/or response back to class A.
Something along the lines of:
Class A:
Class B: