Trying to use a single Amazon API Gateway endpoint to accept both HTTP and websocket requests

0

My understanding is that a websocket connection is negotiated with an upgrade request on top of an HTTP API. Can an Amazon API Gateway websocket endpoint also serve HTTP requests (which don't require the client to upgrade)? I'm trying to use a single vanity URL (such as api.foo.com instead of ws.foo.com and api.foo.com).

AWS
Aaron_C
已提問 4 年前檢視次數 1700 次
1 個回答
1
已接受的答案

It's not possible to combine REST (HTTP) APIs with WebSocket APIs into a single vanity URL. It's also not possible to mix both types of requests using the same custom domain name.

profile pictureAWS
專家
Uri
已回答 4 年前
profile picture
專家
已審閱 2 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南