为什么“无效的内容类型" [英] Why "Invalid Content Type"
问题描述
尝试更新Marketo中潜在客户记录上的数据字段.使用 C#.我发送:
Trying to update a data field on a lead record in Marketo. Using C#. I send:
{"action":"updateOnly","input":[{"email":"dfranks@gmail.com","leadQuality":"Hot"}]}
然后回来:
{"requestId":"d98e#14b2d7dd1f3","success":false,"errors":[{"code":"612","message":"Invalid Content Type"}]}
为什么无效的内容类型"消息?字段leadQuality
是合法的.电子邮件地址存在.我尝试了许多不同的字段,并且始终使用相同的消息.访问令牌也很好.
Why the Invalid Content type message? The field leadQuality
is legit. The email address exists. I've tried a number of different fields and always the same message. Access token is good too.
推荐答案
Content-Type
是HTTP标头.通常,您将其设置为application/json
以进行REST调用.
Content-Type
is a HTTP header. Usually, you set it to application/json
for REST calls.
您应该在生成HTTP请求或REST调用的代码中执行此操作.
You should do this in the code where you generate the HTTP request or REST call.
我在 marketo示例.您可以尝试两种选择之一.
I found text/json
as Content-Type
and Accept
header value in one of the marketo examples. You might try one of the two choices.
这篇关于为什么“无效的内容类型"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!