Sending data
See original GitHub issueYour Environment
- Plugin version:
- Platform: iOS or Android
- OS version:
- Device manufacturer and model:
- Running in Simulator:
- Cordova version (
cordova -v
): - Cordova platform version (
cordova platform ls
): - Plugin configuration options:
- Link to your project:
Context
Just want to ask something about data sending, i am using asp.net as server to retrieve data from
cordova-plugin-background-geolocation mobile apps. i try to use request.param to read the data but ufortunately i did’nt get the data from
postTemplate: {
lat: ‘@latitude’,
lon: ‘@longitude’,
act:‘APOKONO’,
provider: ‘@provider’,
locationProvider: ‘@locationProvider’,
time: ‘@time’,
accuracy: ‘@accuracy’,
speed: ‘@speed’,
altitude: ‘@altitude’,
bearing: ‘@bearing’
}
only retrieve data from header
httpHeaders: {
‘AUTH’: ‘JSDFSDS77SDF8SD56S5DF86SD9F799SAD7U’
}
so can i know how the actual this plugin work to send the data to server?
Expected Behavior
============ READ FORM ================= ============ END FORM ================= ============ READ PARAM ================= live_loc:MOBILE_LOCATION_TEST ALL_HTTP:HTTP_CONNECTION:Keep-Alive HTTP_CONTENT_LENGTH:199 HTTP_CONTENT_TYPE:application/json HTTP_ACCEPT_ENCODING:gzip HTTP_HOST:192.168.8.165 HTTP_USER_AGENT:Dalvik/2.1.0 (Linux; U; Android 10; LYA-L29 Build/HUAWEILYA-L29) HTTP_AUTH:JSDFSDS77SDF8SD56S5DF86SD9F799SAD7U
ALL_RAW:Connection: Keep-Alive Content-Length: 199 Content-Type: application/json Accept-Encoding: gzip Host: 192.168.8.165 User-Agent: Dalvik/2.1.0 (Linux; U; Android 10; LYA-L29 Build/HUAWEILYA-L29) AUTH: JSDFSDS77SDF8SD56S5DF86SD9F799SAD7U
APPL_MD_PATH:/LM/W3SVC/1/ROOT/dbagent
APPL_PHYSICAL_PATH:D:\System Development\Published\dBAgent
AUTH_TYPE:
AUTH_USER:
AUTH_PASSWORD:
LOGON_USER:
REMOTE_USER:
CERT_COOKIE:
CERT_FLAGS:
CERT_ISSUER:
CERT_KEYSIZE:
CERT_SECRETKEYSIZE:
CERT_SERIALNUMBER:
CERT_SERVER_ISSUER:
CERT_SERVER_SUBJECT:
CERT_SUBJECT:
CONTENT_LENGTH:199
CONTENT_TYPE:application/json
GATEWAY_INTERFACE:CGI/1.1
HTTPS:off
HTTPS_KEYSIZE:
HTTPS_SECRETKEYSIZE:
HTTPS_SERVER_ISSUER:
HTTPS_SERVER_SUBJECT:
INSTANCE_ID:1
INSTANCE_META_PATH:/LM/W3SVC/1
LOCAL_ADDR:192.168.8.165
PATH_INFO:/dbagent/j
PATH_TRANSLATED:D:\System Development\Published\dBAgent\j
QUERY_STRING:live_loc=MOBILE_LOCATION_TEST
REMOTE_ADDR:192.168.8.142
REMOTE_HOST:192.168.8.142
REMOTE_PORT:49250
REQUEST_METHOD:POST
SCRIPT_NAME:/dbagent/j
SERVER_NAME:192.168.8.165
SERVER_PORT:80
SERVER_PORT_SECURE:0
SERVER_PROTOCOL:HTTP/1.1
SERVER_SOFTWARE:Microsoft-IIS/10.0
URL:/dbagent/j
HTTP_CONNECTION:Keep-Alive
HTTP_CONTENT_LENGTH:199
HTTP_CONTENT_TYPE:application/json
HTTP_ACCEPT_ENCODING:gzip
HTTP_HOST:192.168.8.165
HTTP_USER_AGENT:Dalvik/2.1.0 (Linux; U; Android 10; LYA-L29 Build/HUAWEILYA-L29)
HTTP_AUTH:JSDFSDS77SDF8SD56S5DF86SD9F799SAD7U
============ END PARAM =================
Actual Behavior
Possible Fix
Steps to Reproduce
Context
Debug logs
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top GitHub Comments
In case someone has stucked with this (in php at least), I could retrieve the information via $rawData = file_get_contents(“php://input”) Could not retrieve information via $request nor $post variable, thats because it is not a “common webform post kind”.
Try: $data = file_get_contents(“php://input”);