zoukankan      html  css  js  c++  java
  • 405请求报错

     在手端请求某个接口的时候,请求http://10.4.87.179/fleaf/services/lexin/clazz/notice/12098918/remindReceipt/pm 
    报错:
    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.4.87.179/fleaf/services/lexin/clazz/notice/12098918/remindReceipt/pm 

    , com.alamofire.serialization.response.error.data=<>, com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x111189170> { URL: http://10.4.87.179/fleaf/services/lexin/clazz/notice/12098918/remindReceipt/pm 

     } { Status Code: 405, Headers {
        Allow =     (
            "POST,GET,OPTIONS,HEAD"
        );
        "Content-Length" =     (
            0
        );
        Date =     (
            "Mon, 10 Sep 2018 02:39:03 GMT"
        );
        Server =     (
            "Apache-Coyote/1.1"
        );
    } }} 
     
    查看接口是get方法,而手端调用使用的是post方式
     
    将手端调用接口方式改成get方式请求即可,或者将接口请求方式改为post,(保持一致即可)
  • 相关阅读:
    文本文件、二进制文件
    trunc()
    字符集、编码
    windows注册表:扫盲
    decode() & sign()
    移动前端工作的那些事前端制作之自适应制作篇
    css hack知识详解
    IE6兼容性大全
    JS正则匹配入门基础!
    [转载]Javascript中批量定义CSS样式 cssText属性
  • 原文地址:https://www.cnblogs.com/zhouj850/p/9618171.html
Copyright © 2011-2022 走看看