Fetch API, custom request headers, CORS, and cross-origin redirects

后端 未结 1 1868
失恋的感觉
失恋的感觉 2020-12-10 15:21

I need to make an HTTP GET request with custom request headers in-browser and process the result as it streams in. The Fetch API is ideal for this:



        
相关标签:
1条回答
  • 2020-12-10 15:45

    Supporting redirects to requests that require a preflight is very recent change to Fetch (which defines CORS).

    https://github.com/whatwg/fetch/commit/0d9a4db8bc02251cc9e391543bb3c1322fb882f2

    I believe some implementations have started adjusting their implementations, but this will take some time to reach everyone.

    0 讨论(0)
提交回复
热议问题