purescript-fetch/test/Test.Effect.Aff.HTTP.Form.js
2024-11-23 13:49:36 -06:00

8 lines
280 B
JavaScript

export const dummyForm = () => {
const form = new FormData()
form.set('foo', 'bar')
const hi = Buffer.from('hello, world!', 'utf8')
form.set('baz', new Blob([hi.buffer.slice(hi.byteOffset, hi.byteOffset + hi.byteLength)], {type: 'text/plain'}), 'foo.txt')
return form
}