This is my code:
NSError *error;
NSURLResponse *response;
NSData *dataReply;
NSString *stringReply;
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL: [NSURL URLWithString: URLGOESHERE]];
[request setHTTPMethod: @"GET"];
dataReply = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
stringReply = [[NSString alloc] initWithData:dataReply encoding:NSUTF8StringEncoding];
I want to put that in a function soo that i can call it from all my other buttons but i can set the
URLWithString: URLGOESHERE]];
how would i do this and how would i call it ?
Thanks
Mason