简体   繁体   中英

chrome send post request can't get request body

I send a post request to windows local service(c#) at http://127.0.0.1:13728 . When i open the website at chrome, my local service can't get request body. Windows service code:

string recData = new StreamReader(request.InputStream).ReadToEnd();

request:

request

request payload

The recData is null or empty. When i open it at ie or other browser, it works fine. The Chrome works fine before. But recently it suddenly doesn't work. I searched a lot, but can't figure out why.

Please help.Thx.

I find out why. Because chrome 98 update, when request a private.network, the browser will send a preflight first. But my local service ignore the preflight request and don't return anything. The preflight request status is always pending,so the really request don't send.

check this: Private Network Access: introducing preflights

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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