0.2.6 • Published 2 years ago
@s3pweb/capacitor-http v0.2.6
@s3pweb/capacitor-http
A native HTTP plugin for CORS-free requests and file transfers
Install
npm install @s3pweb/capacitor-http
npx cap syncAPI
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>| Param | Type |
|---|---|
options | { value: string; } |
Returns: Promise<{ value: string; }>
uploadFile(...)
uploadFile(options: HttpUploadFileOptions) => Promise<HttpUploadFileResult>| Param | Type |
|---|---|
options | HttpUploadFileOptions |
Returns: Promise<HttpUploadFileResult>
Interfaces
HttpUploadFileResult
HttpUploadFileOptions
| Prop | Type | Description |
|---|---|---|
url | string | The URL to upload the file to |
name | string | The field name to upload the file with |
blob | any | For uploading a file on the web, a JavaScript Blob to upload |
Authorization | string | For uploading a file natively, the Authorization header to use |