CFormData
Create readable "multipart/form-data" streams. Can be used to submit forms and file uploads to other web applications.
Hierarchy
CFormData
Index
Constructors
Properties
Methods
Constructors
constructor
+ new CFormData(data?
: any): CFormData
Parameters:
data?
any
Returns: CFormData
Properties
Static
DEFAULT_CONTENT_TYPE
Static
DEFAULT_CONTENT_TYPE▪ DEFAULT_CONTENT_TYPE: string = "application/octet-stream"
Static
LINE_BREAK
Static
LINE_BREAK▪ LINE_BREAK: string = " "
Methods
append
▸ append(name
: string, value
: any, meta?
: CFormDataEntryMetadata): void
Parameters:
Returns: void
delete
▸ delete(name
: string): void
Parameters:
name
string
Returns: void
forEach
▸ forEach(callbackfn
: function): void
Parameters:
▪ callbackfn: function
▸ (value
: CFormDataValue, key
: string, parent
: CFormData): void
Parameters:
Returns: void
get
▸ get(name
: string): CFormDataValue | null
Parameters:
name
string
Returns: CFormDataValue | null
getAll
▸ getAll(name
: string): CFormDataValue[]
Parameters:
name
string
Returns: CFormDataValue[]
getBoundary
▸ getBoundary(): string
Returns: string
getBuffer
▸ getBuffer(): Promise‹Buffer›
Returns: Promise‹Buffer›
getHeaders
▸ getHeaders(): object
Returns: object
content-type: string = 'multipart/form-data; boundary=' + this.getBoundary()
has
▸ has(name
: string): boolean
Parameters:
name
string
Returns: boolean
pipe
▸ pipe(writable
: Writable): void
Parameters:
writable
Writable
Returns: void
set
▸ set(name
: string, value
: CFormDataValue | Blob, meta?
: CFormDataEntryMetadata): void
Parameters:
Returns: void
toString
▸ toString(): string
Returns: string
Static
from
Static
from▸ from(data
: any, __namedParameters
: object): FormData | CFormData
Parameters:
▪ data: any
▪Default value
__namedParameters: object= {}
forceImplementation
undefined | "native" | "custom"
Returns: FormData | CFormData
Static
isFormData
Static
isFormData▸ isFormData(data
: any): data is FormData | CFormData
Parameters:
data
any
Returns: data is FormData | CFormData
Last updated