8000 GitHub - yusufokkabas/background-http
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

yusufokkabas/background-http

Repository files navigation

background-http

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

Install

npm install background-http
npx cap sync

API

echo(...)

echo(options: { value: string; }) => Promise<{ value: string; }>
Param Type
options { value: string; }

Returns: Promise<{ value: string; }>


sendLocationUpdate(...)

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; }>


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0