خرید بک لینک

Vote count: 0

I need to make some HTML requests, and I decided to use Alamofire.

For the very first time I make the request below, it works fine, retus me the access key. Then if I try to make any call again (login, logout, register etc. any call), it does not work, it fail and gives me error.

It work fine once again for one time if I remove the application and reinstall it, than I can make 1 request again until it starts to give me errors.

Here is the login request:

    let parameters : [ String : String] = [
        "email": email,
        "password":password
    ]
    Alamofire.request(.POST, url, parameters: parameters).validate()
        .responseJSON { response in
            switch response.result {
            case .Success:
                if let json = response.result.value {
                    print("JSON: (json)")
                }
            case .Failure(let error):
                print(error)
            }
        }

Here is the error that appears every time after it works for one time per install:

Error Domain=com.alamofire.error Code=-6003 "Response status code was >unacceptable: 403" UserInfo={NSLocalizedFailureReason=Response status >code was unacceptable: 403}

Any help is appreciated, thanks.

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 4 ارديبهشت 1395 ساعت: 20:46

صفحه بندی