Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.1.3.crowdsync #32

Open
goncharik opened this issue Jan 29, 2013 · 1 comment
Open

Version 0.1.3.crowdsync #32

goncharik opened this issue Jan 29, 2013 · 1 comment

Comments

@goncharik
Copy link
Contributor

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];
    }
}
@sergeyzenchenko
Copy link
Contributor

use latest version of DXDAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants