简体   繁体   中英

How would I consume the body of a put request from a web worker

I want to consume data sent through a put request in a web worker. How would I do so?

this the part in my code where I am trying to handle the put request

if (method === 'put') {
    var request = event.request;
    //how would I turn the request object into an array buffer?
}

您可以使用.arrayBuffer()方法请求的主体用作数组缓冲区。

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