不允许的方法

蒂斯

尝试上传REST分机。到ML8。错误消息是“不允许使用方法”,此错误来自cURL。这是405错误。

这个错误对我来说还不够清楚。不知道在哪里寻找解决方案。这应该很简单,并且大多数代码是从ML网站或我的模板中复制/粘贴的。

卷曲

curl --anyauth --user 'thijs':'password' -X PUT -i -H "Content-type: application/vnd.marklogic-javascript" -d@"./plantinfo-ext.sjs" $URL'http://uien:8017/v1/config/resources/plantinfo?method=get'  

cURL响应

HTTP/1.1 401 Unauthorized
Server: MarkLogic
WWW-Authenticate: Digest realm="public", qop="auth", nonce="fb8b383b56b4dba52dc", opaque="20e91abaf1b"
Content-Type: text/html; charset=utf-8
Content-Length: 209
Connection: Keep-Alive
Keep-Alive: timeout=5

HTTP/1.1 405 Method Not Allowed
Content-Type: text/html; charset=utf-8
Server: MarkLogic
Allow: DELETE, GET, HEAD, OPTIONS
Content-Length: 221
Connection: Keep-Alive
Keep-Alive: timeout=5

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>405 Method Not Allowed</title>
    <meta name="robots" content="noindex,nofollow"/>
  </head>
  <body>
    <h1>405 Method Not Allowed</h1>
  </body>
</html>

REST分机。

/**
 * @name plantinfo
 * This REST extentsion provides SOAP service for the shipment data
 */

function get() {

    doc = {'test': 'yes'};

    return doc;
}

// Main
exports.GET = get;

ML错误

10.8.0.6 - thijs [09/Dec/2015:14:58:23 -0500] "PUT /v1/config/resources/plantinfo?method=get HTTP/1.1" 405 221 - "curl/7.35.0"
大卫·恩尼斯

我只是使用了示例javascript文件,并使用以下命令将其加载:

curl --anyauth --user admin:admin -X PUT -i \
-H "Content-type: application/vnd.marklogic-javascript"\
--data-binary @"./test.sjs"   \
'http://localhost:8000/v1/config/resources/example'

该示例来自文档,并且即使在ML 8.0中也可以正常工作。为此,我得到一个204:

我建议您在此处使用示例curl命令,如果它可以工作,请对其进行重构。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

不允许张贴方法

来自分类Dev

Flask 不允许的方法

来自分类Dev

405不允许用于POST的方法

来自分类Dev

烧瓶中方法不允许错误

来自分类Dev

不允许部分应用“变异”方法

来自分类Dev

Thingworx:不允许使用GET方法

来自分类Dev

硒测试:方法不允许错误

来自分类Dev

方法内部不允许接口

来自分类Dev

405不允许使用方法

来自分类Dev

烧瓶-不允许使用方法

来自分类Dev

不允许ExpressJS 405 POST方法

来自分类Dev

Microsoft Graph订阅-不允许的方法

来自分类Dev

OneupUploaderBundle(blueimp),-不允许的方法

来自分类Dev

“细节”: “方法\” POST \ “不允许的。”

来自分类Dev

不允许的方法(POST):/ home /

来自分类Dev

Grails“不允许的方法”怪异

来自分类Dev

appannie API错误:方法不允许

来自分类Dev

405不允许使用Spring的方法

来自分类Dev

OneupUploaderBundle(blueimp),-不允许的方法

来自分类Dev

方法不允许使用滑轨

来自分类Dev

不允许使用方法“ POST”

来自分类Dev

不允许使用 Laravel 方法

来自分类Dev

烧瓶中不允许的方法

来自分类Dev

Laravel 5.4 中不允许的方法

来自分类Dev

不允许的方法 (POST) - 搜索

来自分类Dev

AngularJS / Laravel DELETE(不允许的方法)

来自分类Dev

Django:不允许的方法(POST):

来自分类Dev

Python 不允许我调用方法

来自分类Dev

405 不允许删除的方法