mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
44694d8a90
* Fixes binary data request bodies in the Node adapter * Fix type
11 lines
261 B
TypeScript
11 lines
261 B
TypeScript
|
|
export async function post({ request }: { request: Request }) {
|
|
let body = await request.arrayBuffer();
|
|
let data = new Uint8Array(body);
|
|
let r = data.reverse();
|
|
return new Response(r, {
|
|
headers: {
|
|
'Content-Type': 'application/octet-stream'
|
|
}
|
|
});
|
|
}
|