iOS登陆不上,报错了

chyf 2020-3-25 882

iOS登录不上,为什么呢?

login error with code -1, message Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set." UserInfo={NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set., NSUnderlyingError=0x600002e44480 {Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: method not allowed (405)" UserInfo={NSLocalizedDescription=Request failed: method not allowed (405), NSErrorFailingURLKey=http://10.0.0.234/login, com.alamofire.serialization.response.error.data={length = 38, bytes = 0x506c6561 73652075 73652047 4554206d ... 73742066 696c6521 }, com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x60000205c2c0> { URL: http://10.0.0.234/login } { Status Code: 405, Headers {    Connection =     (        "keep-alive"    );    "Content-Encoding" =     (        "utf-8"    );    "Content-Length" =     (        38    );    "Content-Type" =     (        "application/json;charset=utf-8"    ); } }}}}

最新回复 (2)
  • x86 2020-3-26
    引用 2
    405,login接口需要用post方式访问,确认下是否现在是用get方式访问?
  • HeavyRain 2020-3-27
    引用 3
    appserver的地址请检查一下对不对,默认是8888端口
返回