httpdns_ios_demo/httpdns_ios_demo/Example/GeneralExample/GeneralScenario.m [76:98]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NSURLSessionTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
        if (error) {
            NSString *errorStr = [NSString stringWithFormat:@"Http request failed with error: %@", error];
            if (completionHandler) {
                completionHandler(errorStr);
            }
            return;
        }

        NSMutableString *message = [NSMutableString string];
        NSString *responseStr = [NSString stringWithFormat:@"HttpResponse: %@", response.description];

        [message appendFormat:@"\n\n%@", responseStr];

        NSString *dataStr = [[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding];
        [message appendFormat:@"\n\nHttpResponseData:\n %@", dataStr];

        if (completionHandler) {
            completionHandler(message);
        }
        NSLog(@"response data: %@", dataStr);
    }];
    [task resume];
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



httpdns_ios_demo/httpdns_ios_demo/Example/HttpsExample/HTTPSSimpleScenario.m [74:96]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NSURLSessionTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
        if (error) {
            NSString *errorStr = [NSString stringWithFormat:@"Http request failed with error: %@", error];
            if (completionHandler) {
                completionHandler(errorStr);
            }
            return;
        }

        NSMutableString *message = [NSMutableString string];
        NSString *responseStr = [NSString stringWithFormat:@"HttpResponse: %@", response.description];

        [message appendFormat:@"\n\n%@", responseStr];

        NSString *dataStr = [[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding];
        [message appendFormat:@"\n\nHttpResponseData:\n %@", dataStr];

        if (completionHandler) {
            completionHandler(message);
        }
        NSLog(@"response data: %@", dataStr);
    }];
    [task resume];
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



