Tag Archives: testing

AFNetworking requestWithMethod:URLString: parameters:error: returns nil for URLString

I was creating a request as below to test one of my network calls. NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"POST" URLString:[NSURL URLWithString:URLString relativeToURL:self.baseURL].absoluteString parameters:parameters error:nil];NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"POST" URLString:[NSURL URLWithString:URLString relativeToURL:self.baseURL].absoluteString parameters:parameters error:nil]; Annoyingly the requestSerializer would return nil for the URLString. This is the url I was expecting it to return. {baseURL}/users/396250/bookings/33050/cancellation?reason=Bad weather After […]