static BOOL TNLURLRequestHasBody()

in Source/TNLURLSessionTaskOperation.m [2538:2555]


static BOOL TNLURLRequestHasBody(NSURLRequest *request, id<TNLRequest> requestPrototype)
{
    if (request.HTTPBody) {
        return YES;
    }

    if ([requestPrototype respondsToSelector:@selector(HTTPBodyFilePath)] && requestPrototype.HTTPBodyFilePath) {
        return YES;
    }

    if ([requestPrototype respondsToSelector:@selector(HTTPBodyStream)] && requestPrototype.HTTPBodyStream) {
        return YES;
    }

    TNLAssertMessage(!request.HTTPBodyStream, @"TNLURLSessionTaskOperation doesn't support HTTPBodyStream!");

    return NO;
}