Web Pub Sub - Send To Connection
将请求正文内的内容发送到特定连接。
POST {endpoint}/api/hubs/{hub}/connections/{connectionId}/:send?api-version=2024-01-01
			POST {endpoint}/api/hubs/{hub}/connections/{connectionId}/:send?api-version=2024-01-01&messageTtlSeconds={messageTtlSeconds}
			URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 | 
|---|---|---|---|---|
| 
						 connection 
					 | 
					path | True | 
			 string minLength: 1 | 
					
						 连接 ID。  | 
				
| 
						 endpoint 
					 | 
					path | True | 
			 string (url)  | 
					
						 Web PubSub 服务实例的 HTTP 或 HTTPS 终结点。  | 
				
| 
						 hub 
					 | 
					path | True | 
			 string pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$ | 
					
						 目标中心名称,该名称应以字母字符开头,并且仅包含字母数字字符或下划线。  | 
				
| 
						 api-version 
					 | 
					query | True | 
			 string  | 
					
						 REST API 的版本。  | 
				
| 
						 message 
					 | 
					query | 
			 integer (int32) minimum: 0maximum: 300  | 
					
						 发送到服务的消息的生存时间(TTL)值(以秒为单位)。 0 是默认值,这意味着消息永不过期。 300 是最大值。 如果此参数为非零,则服务不会删除客户端在指定 TTL 内使用的消息。 当客户端的带宽受到限制时,此参数可以帮助。  | 
				
请求正文
Media Types: "application/octet-stream", "text/plain", "application/json"
| 名称 | 类型 | 说明 | 
|---|---|---|
| message | 
			 string (binary)  | 
	
		 有效负载正文。  | 
响应
| 名称 | 类型 | 说明 | 
|---|---|---|
| 202 Accepted | 
		 接受  | 
|
| Other Status Codes | 
		 错误响应 标头 x-ms-error-code: string  | 
示例
WebPubSub_SendToConnection   
			示例请求
POST {endpoint}/api/hubs/hub1/connections/connection1/:send?api-version=2024-01-01&messageTtlSeconds=15
"Message to send"
示例响应
定义
| 名称 | 说明 | 
|---|---|
| 
							Error | 
						
							 错误对象。  | 
					
| 
							Inner | 
						
ErrorDetail 
			
			错误对象。
| 名称 | 类型 | 说明 | 
|---|---|---|
| code | 
			 string  | 
	
		 服务器定义的错误代码集之一。  | 
| details | 
		 导致此报告错误的特定错误的详细信息数组。  | 
|
| inner | ||
| message | 
			 string  | 
	
		 错误的人工可读表示形式。  | 
| target | 
			 string  | 
	
		 错误的目标。  | 
InnerError 
			
			
				| 名称 | 类型 | 说明 | 
|---|---|---|
| code | 
			 string  | 
	
		 比包含的错误提供的错误代码更具体。  | 
| inner |