Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
汇流RESTAPI_Rest_Curl_Confluence_Confluence Rest Api - Fatal编程技术网

汇流RESTAPI

汇流RESTAPI,rest,curl,confluence,confluence-rest-api,Rest,Curl,Confluence,Confluence Rest Api,我正在尝试将文档添加到汇流页面。我正在使用以下代码: E:\APP\“curl-7.53.1”\src\curl.exe-v-S-u用户:密码-X POST-H“X-Atlassian-Token:no check”-F”文件=@C:\Users\srvc\u mdw\u dev\Desktop\conf.txt”-F“comment=这是我的文件”http://confluence.example.net/rest/api/content/36375143/child/attachment"

我正在尝试将文档添加到汇流页面。我正在使用以下代码:

E:\APP\“curl-7.53.1”\src\curl.exe-v-S-u用户:密码-X POST-H“X-Atlassian-Token:no check”-F”文件=@C:\Users\srvc\u mdw\u dev\Desktop\conf.txt”-F“comment=这是我的文件”http://confluence.example.net/rest/api/content/36375143/child/attachment"
但我得到了以下错误:

/confNote:不必要地使用-X或--request,POST已经被推断出来。
*不支持名称查找超时*正在尝试IPaddress。。。
*TCP_节点集
*已连接到confluence.example.net(ip地址)端口80(#0)
*对用户“user”使用Basic进行服务器身份验证
>POST/rest/api/content/36375143/child/attachment HTTP/1.1
>主机:example.com>授权:基本c291aGFpbC5vdWFiaUBtZXRyb2V4dGVybmFsLmZyOm1ldHJvNDU2Kg==
>用户代理:curl/7.53.1
>接受:*/*
>X-Atlassian-Token:无检查>内容长度:333
>预期:100人继续
>内容类型:多部分/表单数据;边界=---------------------------646f724e33da0066
>
*HTTP 1.0,假设在找到正文
********编辑******** 一旦我添加了-L,我仍然会得到相同的错误和以下返回:

PS E:\powershell\script> ./conf
* timeout on name lookup is not supported
*   Trying IP address...
* TCP_NODELAY set
* Connected to confluence.exemple.net (IP address) port 80 (#0)
> POST /rest/api/content/pageId/child/attachment HTTP/1.1
> Host: confluence.exemple.net
> User-Agent: curl/7.53.1
> Accept: */*
> X-Atlassian-Token: nocheck
> Content-Length: 633874
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=------------------------9448fd34591626bc
>
* HTTP 1.0, assume close after body
< HTTP/1.0 302 Found
< Location: https://confluence.exemple.net/rest/api/content/pageId/child/attachment
< Server: BigIP
* HTTP/1.0 connection set to keep alive!
< Connection: Keep-Alive
< Content-Length: 0
* HTTP error before end of send, stop sending
<
* Closing connection 0
* Issue another request to this URL: 'https://confluence.exemple.net/rest/api/content/pageID/child/attachment'
* Switch from POST to GET
* timeout on name lookup is not supported
*   Trying IPaddress...
* TCP_NODELAY set
* Connected to confluence.exemple.net (IPaddress) port 443 (#1)
* schannel: SSL/TLS connection with confluence.exemple.net port 443 (step 1/3)
* schannel: checking server certificate revocation
* schannel: sending initial handshake data: sending 200 bytes...
* schannel: sent initial handshake data: sent 200 bytes
* schannel: SSL/TLS connection with confluence.exemple.net port 443 (step 2/3)
* schannel: encrypted data buffer: offset 4096 length 4096
* schannel: encrypted data length: 4004
* schannel: encrypted data buffer: offset 4004 length 4096
* schannel: received incomplete message, need more data
* schannel: SSL/TLS connection with confluence.exemple.net port 443 (step 2/3)
* schannel: encrypted data buffer: offset 4865 length 5028
* schannel: next InitializeSecurityContext failed: Unknown error (0x80092013) - The revocation function was unable to ch
eck revocation because the revocation server was offline.
* Closing connection 1
* schannel: shutting down SSL/TLS connection with confluence.exemple.net port 443
* Send failure: Connection was reset
* schannel: failed to send close msg: Failed sending data to the peer (bytes written: -1)
* schannel: clear security context handle
PS E:\powershell\script>/conf
*不支持名称查找超时
*正在尝试IP地址。。。
*TCP_节点集
*已连接到confluence.example.net(IP地址)端口80(#0)
>POST/rest/api/content/pageId/child/attachment HTTP/1.1
>主机:confluence.example.net
>用户代理:curl/7.53.1
>接受:*/*
>X-Atlassian-Token:nocheck
>内容长度:633874
>预期:100人继续
>内容类型:多部分/表单数据;边界=---------------------------9448fd34591626bc
>
*HTTP 1.0,假设在正文之后关闭
找到
服务器响应重定向(状态代码302)。尝试添加选项
-L
,使
curl
遵循该重定向。Hello@AnsgarWiechers您能看到更新吗?我使用了-L选项,但仍然有相同的错误。第二个错误似乎是由于检查吊销的证书失败所致。检查不安全连接是否工作(添加参数
-k
)。还要检查吊销服务器无法访问的原因。服务器响应重定向(状态代码302)。尝试添加选项
-L
,使
curl
遵循该重定向。Hello@AnsgarWiechers您能看到更新吗?我使用了-L选项,但仍然有相同的错误。第二个错误似乎是由于检查吊销的证书失败所致。检查不安全连接是否工作(添加参数
-k
)。还要检查吊销服务器无法访问的原因。