简体   繁体   English

通过URL将IoT消息发送到Azure事件中心

[英]Send IoT Message to Azure Event Hub by URL

I am now using a Beacon Reveiver to get the iBeacon Information. 我现在正在使用信标接收器来获取iBeacon信息。 Here is the problem: 这是问题所在:

the receiver platform server only allow me to type a url. 接收方平台服务器仅允许我键入一个网址。 How should I do to send the information to azure eventhub?? 我应该如何将信息发送到azure eventhub? I found this API: 我找到了这个API:

https://NAMESPACE.servicebus.windows.net/EVENTHUB-NAME/publishers/PUBLISHER-NAME/messages https://NAMESPACE.servicebus.windows.net/EVENTHUB-NAME/publishers/PUBLISHER-NAME/messages

I tried it ,but it seems doesn't work. 我尝试过,但似乎不起作用。 Do i miss anything?? 我想念什么吗? or Can anyone teach me how to add the authentication in url? 或任何人都可以教我如何在url中添加身份验证? What should I do now? 我现在应该怎么办?

Thanks 谢谢

You must set an authentication HTTP header in order to send events to Event Hubs. 您必须设置身份验证HTTP标头才能将事件发送到事件中心。 You can't include authentication information in the request URL. 您不能在请求URL中包含身份验证信息。

Even though you can't send messages directly to Event Hubs, you can develop a custom Web API that uses your own URL-based authentication mechanism and forwards the requests to Event Hubs (or another service). 即使您不能直接将消息发送到事件中心,也可以开发自定义Web API,该Web API使用您自己的基于URL的身份验证机制,并将请求转发到事件中心(或其他服务)。 That defeats the purpose of using Event Hubs to some degree but gives you more flexibility. 这在一定程度上违反了使用事件中心的目的,但给了您更大的灵活性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM