Microsoft Azure中的主机URI是什么以及如何查找?

Microsoft Azure中的主机URI是什么以及如何查找?,azure,http-headers,postman,azure-media-services,Azure,Http Headers,Postman,Azure Media Services,在查看Microsoft的REST API文档时,它显示特定请求的头应该包括主机名。我想知道这是什么,我怎么找到它 Microsoft says that these are the request headers: POST https://testrest.cloudapp.net/api/Channels('nb:chid:UUID:2c30f424-ab90-40c6-ba41-52a993e9d393')/Start HTTP/1.1 DataServiceVersion: 3.0

在查看Microsoft的REST API文档时,它显示特定请求的头应该包括主机名。我想知道这是什么,我怎么找到它

Microsoft says that these are the request headers:
POST https://testrest.cloudapp.net/api/Channels('nb:chid:UUID:2c30f424-ab90-40c6-ba41-52a993e9d393')/Start HTTP/1.1  
DataServiceVersion: 3.0;NetFx  
MaxDataServiceVersion: 3.0;NetFx  
Accept: application/json;odata=minimalmetadata  
Accept-Charset: UTF-8  
x-ms-version: 2.11  
Content-Type: application/json;odata=minimalmetadata  
Host: <host URI>  
User-Agent: Microsoft ADO.NET Data Services  
Authorization: Bearer <token value>  
Microsoft说以下是请求头:
邮递https://testrest.cloudapp.net/api/Channels('nb:chid:UUID:2c30f424-ab90-40c6-ba41-52a993e9d393')/Start HTTP/1.1
数据服务版本:3.0;NetFx
MaxDataServiceVersion:3.0;NetFx
接受:application/json;odata=最小元数据
接受字符集:UTF-8
x-ms-version:2.11
内容类型:application/json;odata=最小元数据
主持人:
用户代理:Microsoft ADO.NET数据服务
授权:持票人

由于接收到400错误且没有主机URI,我在连接时遇到问题。起初我没有使用它的原因是因为Postman没有使用它,但是他们的API调用成功了。有人知道主机URI是否必要吗?如果有,我可以在Microsoft Azure中的何处找到它?专门针对媒体服务。

在Http 1.1中,主机头是必需的

Http的要点:

 HTTP/1.0 does not bring host, and HTTP/1.1 adds host head.

 Host can be a domain name, or IP, or port number.

 Host can be customized by programs. Some programs can define false host in order to prevent operators or bypass firewalls.

 Host in HTTP/1.1 can be null value but not without. If no host head is taken, 400 Bad request will be returned.

 The HTTP response header does not contain the host field.

 Some sites do not check host and can pass arbitrary values.
在Postman中,它将在URL中自动用主机(域名)填充主机头


在您的情况下,我们可以用
testrest.cloudapp.net:433

填充主机标题,是否有任何更新???还没有@LeeLiu您的回答很有帮助,因为您指出了主机URI,但是我需要与Microsoft创建一个支持票证,因为应用程序无法连接。这不是你的错,所以我将投票表决你的回答是对这个问题的正确答案。