Options
All
  • Public
  • Public/Protected
  • All
Menu

FormData 构建器

Hierarchy

  • FormDataBuilder

Constructors

constructor

Parameters

  • fd: FormData = new FormData() Default value

Returns FormDataBuilder

Properties

Private fd

fd: FormData

Methods

append

  • append(name: string, value: string | Blob, fileName?: undefined | string): this

Parameters

  • name: string
  • value: string | Blob
  • fileName: undefined | string Optional

Returns this

appends

  • appends(obj: Record<string, string | Blob>): this

Parameters

  • obj: Record<string, string | Blob>

Returns this

clear

  • clear(): this

Returns this

delete

  • delete(name: string): this

Parameters

  • name: string

Returns this

deletes

  • deletes(...names: string []): this

Parameters

  • ...names: string [] Rest

Returns this

get

  • get(): FormData

Returns FormData

set

  • set(name: string, value: string | Blob, fileName?: undefined | string): this

Parameters

  • name: string
  • value: string | Blob
  • fileName: undefined | string Optional

Returns this

sets

  • sets(obj: Record<string, string | Blob>): this

Parameters

  • obj: Record<string, string | Blob>

Returns this

Static formDataToArray

  • formDataToArray(fd: FormData): Array<[string, string | Blob]>

Parameters

  • fd: FormData

Returns Array<[string, string | Blob]>

Static objToFormData

  • objToFormData(data: Record<string, string | Blob | any>): FormData

Parameters

  • data: Record<string, string | Blob | any>

Returns FormData

  • Inherited
  • Protected
  • Private
  • Static
  • Module
  • Object
  • Property
  • Function
  • Variable
  • Index
  • Type
  • Class
  • Interface
  • Enum
  • Constructor
  • Getter/Setter
Made with ❤️ by pirix-gh. Documentation generated by TypeDoc.