尝试通过rest客户端访问POST数据,获取405。
响应头状态允许: GET、OPTIONS、HEAD。
那么,如何使rest容器接受POST/PUT方法?
EndPoint http://localhost:8080/kie-server/services/rest/server请求头使用-
内容-类型:应用程序/json
授权: Basic!@$#%&$$((
接受:申请/json
X ContentType: JSON响应头
服务器: Apache-Coyote/1.1
允许:得到,选择,头
内容-类型: text/html;charset=utf-8
内容长度: 1088
日期:清华,2016年9月1日08:43:33格林尼治时间
尝试使用Advanced客户端、curl和java代码,但结果相同:(
推荐- example.html
发布于 2016-09-01 14:31:10
我认为您必须更改端点(URL)。我建议
http://localhost:8080/kie-server/services/rest/server/containers/instances/("nameOfYourDeployment")
或者在没有实例的情况下尝试。
发布于 2017-01-18 13:01:34
在Rest客户机中,提供以下一组值:
网址:
http://localhost:8080/kie-server/services/rest/server/containers/instances/<name-of-your-container>头:
Accept: application/json
Content-Type: application/json选择方法类型POST和您的JSON request payload
当您点击API时,它会要求您提供用户名和密码,提供凭据。
fou可以将有效载荷发送到:
{
"commands": [
{
"insert": {
"out-identifier": "Input",
"return-object": "true",
"object": {
"<complete-package-name>.<class-name>": {
"variable-1" : "value-1",
"variable-2" : "value-2"
}
}
}
},
{
"fire-all-rules": {
"outIdentifier": "output"
}
}
]
}https://stackoverflow.com/questions/39269092
复制相似问题