[英]What value is required for the HTTP header Content-Type for Workday SOAP APIs?
I want to access data from Workday HCM using the APIs mentioned here .我想使用此处提到的 API 从 Workday HCM 访问数据。 Instead of using SoapUI or Zeep Python library, I want to try to fetch data using Postman as a part of a POC.
我不想使用 SoapUI 或 Zeep Python 库,而是尝试使用 Postman 作为 POC 的一部分来获取数据。 I was curious to know what should be the value for the header Content-Type when I make a request using Postman ie whether it should be application/xml or text/xml.
当我使用 Postman 发出请求时,我很想知道 header Content-Type的值应该是多少,即它应该是 application/xml 还是 text/xml。 You may have a few questions that I have answered here:
您可能有几个问题,我已经在这里回答了:
Q1. Q1。 Why can't I just try using application/xml and then text/xml?
为什么我不能先尝试使用 application/xml,然后再使用 text/xml?
A. I don't have an access to any Workday tenant to try it out. A. 我无权访问任何 Workday 租户来试用它。
Q2. Q2。 Why do I need to know the Content-Type even before I have the tenant?
为什么我在拥有租户之前就需要知道 Content-Type?
A. We already have a Postman type solution which lets a user to select either application/xml or application/json. A. 我们已经有一个 Postman 类型的解决方案,它允许用户使用 select 应用程序/xml 或应用程序/json。 Depending upon what Workday requires, I'll need to take further actions.
根据 Workday 的要求,我需要采取进一步的措施。
Q3. Q3。 Both the Content-Type values are basically the same.
两个 Content-Type 值基本相同。 How does it matter?
有什么关系?
A. I know a few SOAP APIs fail when provided with Content-Type as application/xml instead of text/xml, hence the question.答:我知道一些 SOAP API 在将 Content-Type 提供为 application/xml 而不是 text/xml 时会失败,因此是这个问题。 If Workday APIs respond successfully for both the types, please let me know.
如果 Workday API 对这两种类型都成功响应,请告诉我。
application/xml
and text/xml
are acceptable for the Workday SOAP API. application/xml
和text/xml
对于 Workday SOAP API 是可接受的。
In fact, Content-Type
in a request is not used at all by Workday.事实上,Workday 根本不使用请求中的
Content-Type
。 You can send Content-Type: foo
and you will get your response.你可以发送
Content-Type: foo
,你会得到你的回应。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.