调用Azure Event Hub REST API时出错 [英] Error while calling Azure Event Hub REST API
问题描述
我正在尝试在POC上工作,我将把消息发布到Event Hub,然后在azure blob存储中使用它。我在其下创建了一个新的事件中心命名空间和一个事件中心,然后尝试使用REST API使用共享密钥发布消息,但是
获取错误。以下是HTTP POST请求和响应的详细信息。请帮忙......我做错了什么?
I'm trying to work on a POC where I am going to post messages into Event Hub and then consume it within azure blob storage. I created a new event hub namespace and an event hub under it and then trying to use REST API to post message using shared key but getting error. here are the details of HTTP POST request and response. Please help.. what am I doing wrong??
POST / aaeventhub / messages?timeout = 60& amp; api-version = 2014-01 HTTP / 1.1
主持人:aaeventhubns.servicebus.windows.net
内容类型:application / atom + xml; type = entry; charset = utf-8
授权:SharedAccessSignature sr = aaeventhubns.servicebus.windows.net& sig = mE3DVY4rZXbIVNY4a7XXXXXtlGzqUDsBf0XMU9JOzlo%3D& se = 1555052400& skn = RootManageSharedAccessKey
Cache-Control:no-cache
Postman-Token:22c611ca -2e63-1c36-f554-240a80d2a2ba
{" test":123}
POST /aaeventhub/messages?timeout=60&api-version=2014-01 HTTP/1.1
Host: aaeventhubns.servicebus.windows.net
Content-Type: application/atom+xml;type=entry;charset=utf-8
Authorization: SharedAccessSignature sr=aaeventhubns.servicebus.windows.net&sig=mE3DVY4rZXbIVNY4a7XXXXXtlGzqUDsBf0XMU9JOzlo%3D&se=1555052400&skn=RootManageSharedAccessKey
Cache-Control: no-cache
Postman-Token: 22c611ca-2e63-1c36-f554-240a80d2a2ba
{"test":123}
回复:获取错误401 4013:授权令牌签名无效
Response: getting error 401 4013: Invalid authorization token signature
content-length → 0
推荐答案
Hello testingBee,
Hello testingBee,
由于您的问题与Az无关IoTHub请允许我建议您使用[azure-eventhub]标签在StackOverflow上提出相同的问题 - > https: //stackoverflow.com/questions/tagged/azure-eventhub
As your question is not related with Azure IoTHub please let me suggest that you ask the same question on StackOverflow using [azure-eventhub] tag -> https://stackoverflow.com/questions/tagged/azure-eventhub
谢谢!
这篇关于调用Azure Event Hub REST API时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!