Skip to content

Correct usage od SDK #102

@mpycio

Description

@mpycio

Hi,
Following example for ios, I have following code:

    let adapter = LBRESTAdapter(URL: NSURL(string: "http://polis.dev:3000/api/v1/"), allowsInvalidSSLCertificate: true)
    let repository = adapter.repositoryWithClass(PolisUserRepository.classForCoder())
    let user = repository.modelWithDictionary([
        "email": "[email protected]",
        "password": "password"
        ]) as! PolisUser;

    user.saveWithSuccess({ () -> Void in
        NSLog("user saved")
        }) { (error:NSError!) -> Void in
            NSLog("")
    }

saveWithSuccess always results in 404, because URL is constructed with 'prototype' path:
URL: http://polis.dev:3000/api/v1/polisUser/prototype/create?...

What am I doing wrong, API explorer doesn't append 'prototype' in request URL

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