大佬教程收集整理的这篇文章主要介绍了我正在尝试从 Companies House API 获取 pdf 文档,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试使用 ColdFusion 从 API 获取 pdf 文档,但收到此错误:
<?xml version="1.0" enCoding="UTF-8"?> <Error><Code>InvalIDArgument</Code> <message>Only one auth mechanism allowed; only the X-Amz-Algorithm query parameter,Signature query String parameter or the Authorization header should be specifIEd</message><Argumentname>Authorization</Argumentname> <ArgumentValue>#key#</ArgumentValue> <requestID>Some requestID</requestID> <HostID>some host ID</HostID>
400 错误请求
这是我的代码:
<cfset urlD="https://document-API.company-information.service.gov.uk/document/#documentID#/content">
<cfhttp urlD="#Url#" method="GET" result="takeDoc" resolveurl="Yes" timeout="999">
<cfhttpparam type="header" name="Accept" value="application/pdf">
<cfhttpparam type="header" name="content-length" value=93295 />
<cfhttpparam type="header" name="Authorization" value="#key#"/>
</cfhttp>
<cfdump var="#takeDoc#">
Any IDeas how to solve this final step?
我看来您正在传输值 #key# 作为您的授权而不是变量键的值。尝试在 cfhttp 标签周围放置 cfoutput 标签。
以上是大佬教程为你收集整理的我正在尝试从 Companies House API 获取 pdf 文档全部内容,希望文章能够帮你解决我正在尝试从 Companies House API 获取 pdf 文档所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。