Releases: octet-stream/form-data-encoder
Releases · octet-stream/form-data-encoder
1.5.2
1.5.1
1.5.0
Add
- Introduce
FormDataEncoder.contentLength
property.
Update
- Make sure
readonly
properties actually read-only in runtime.
All changes: v1.4.4...v1.5.0
1.4.4
Update
- Internal improvements: Use fixed size for boundary because createBoundary function is private.
All changes: v1.4.3...v1.4.4
1.4.2
Update
- Use less ambiguous name for form data encoder class and exports:
Encoder
->FormDataEncoder
; - Add separate tsconfig file for AVA;
All changes: v1.4.1...v1.4.2
1.4.3
Update
- Add normalization for non-File field's value following the spec.
All changes: v1.4.2...v1.4.3
1.4.1
1.4.0
Update
- Slightly optimize
createBoundary
using bitwiseA << 0
instead ofMath.floor()
; - Reduce package size by removing comments for JS output (but keep comments for .d.ts output).
All changes: v1.3.0...v1.4.0
1.3.0
1.2.0
Add
- Introduce
.values()
andSymbol.iterator
methods, so the Encoder can be converted toBlob
:
import {Encoder} from "form-data-encoder"
import {Blob} from "fetch-blob"
const form = new FormData()
form.set("field", "FormData serialization using Blob + from-data-encoder.")
const encoder = new Encoder(form)
const options = {
method: "post",
body: new Blob(encoder, {type: encoder.contentType})
}
const response = await fetch("https://httpbin.org/post", options)
console.log(await response.json())
All changes: v1.1.0...v1.2.0