Allows you to use of the Native Http framework.
IMPORTANT NOTE: This plugin is a tool I wrote for testing purposes and used to solve a specific problem. You can do everything this library offers and more with the capacitor official native http plugin. I keep it here for my own reference and as an example for the community.
See: https://capacitorjs.com/docs/apis/http
npm install background-http
npx cap sync
echo(options: { value: string; }) => Promise<{ value: string; }>
Param | Type |
---|---|
options |
{ value: string; } |
Returns: Promise<{ value: string; }>
sendLocationUpdate(options: { url: string; token: string; username: string; latitude: number; longitude: number; timestamp: number; }) => Promise<{ success: boolean; message: string; }>
Sends a location update to the server using native HTTP implementation that works reliably in the background
Param | Type | Description |
---|---|---|
options |
{ url: string; token: string; username: string; latitude: number; longitude: number; timestamp: number; } |
The location data and API details |
Returns: Promise<{ success: boolean; message: string; }>