我将如何消耗网络工作者的PUT请求的身体
我想消耗通过网络工作者中的PUT请求发送的数据。我该怎么办?
这是我试图处理PUT请求的代码中的一部分
if (method === 'put') {
var request = event.request;
//how would I turn the request object into an array buffer?
}
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?
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以消费请求的身体作为阵列buffer使用
.arreaybuffer()
。
You can consume the request's body as an array buffer using the
.arrayBuffer()
method.