Skip to content

Version 0.1.3.crowdsync #32

@goncharik

Description

@goncharik

In DXDALRequestHTTP.m there is no response called if resonseString != nil

- (void) didFinishWithResponseString:(NSString *)responseString
                      responseObject:(id)responseObject
                  responseStatusCode:(NSInteger)responseStatusCode
{

    if (responseString != nil) {

        id result = nil;

        if (self.parser) {

            id parsedObject = [self.parser parseString:responseString];

            BOOL isStandartMapperWithEntityClass = self.entityClass && [self.mapper isKindOfClass:[DXDALMapperStandart class]];
            BOOL isCustomMapper = ![self.mapper isKindOfClass:[DXDALMapperStandart class]];
            BOOL canMap = self.mapper && (isStandartMapperWithEntityClass || isCustomMapper);

            if (canMap) {
                result = [self.mapper mapFromInputData:parsedObject withClass:self.entityClass];
            } else {
                result = parsedObject;
            }

        } else {
            result = responseString;
        }

    } else if ([responseObject isKindOfClass:[NSData class]]) {
        [self didFinishWithResponse:responseObject];
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions