iphone - Objective C - Setting variables in a Request Object -
i trying debug iphone application created contractor no longer us. background c#, , not familiar objective c @ all. wondering if here interpret piece of code me.
to give little bit of background, application providing latitude/longitude coordinates .net service through request object.
(void)shownearestpoi:(cllocationcoordinate2d)coordinate { asiformdatarequest *therequest = [asiformdatarequest requestwithurl: [self urlbuilderfunctionwithendpointname:kserviceidgetnearestpoi] ]; /* nsstring *tmpgeolatstring = [[nsstring stringwithformat:@"%2.6f", coordinate.latitude] stringbyaddingpercentescapesusingencoding:nsutf8stringencoding]; nsstring *tmpgeolongstring = [[nsstring stringwithformat:@"%2.6f", coordinate.longitude] stringbyaddingpercentescapesusingencoding:nsutf8stringencoding]; [therequest setpostvalue:tmpgeolatstring forkey:@"latitude"]; [therequest setpostvalue:tmpgeolongstring forkey:@"longitude"]; */ [therequest setpostvalue:@"1" forkey:@"latitude"]; [therequest setpostvalue:@"1" forkey:@"longitude"]; [therequest setpostvalue:kingmethodnamegetnearestpoi forkey:@"method"]; [therequest addrequestheader:@"user-agent" value:kcustomuseragent]; [therequest setdelegate:self]; [therequest startasynchronous]; request_state = 1; // loading please wait }
what want know whether contractor has hardcoded latitude , longitude 1 , 1 respectively. 2 lines believe happening in below:
[therequest setpostvalue:@"1" forkey:@"latitude"]; [therequest setpostvalue:@"1" forkey:@"longitude"];
any appreciated. cheers!
yes that's happening. looks of it, wanted make sure post getting through, server, rather there being error in string formatting code above it?
Comments
Post a Comment