Dear Forum Members,
Please I have a JSON script that I want to send as a “POST” request to a URL and expect a response. How can I write such script in combination with JavaScript? I was using POSTMAN to do this, but I want to write a script to do it for me.
The JSON is:
{
“jsonrpc”: “2.0”,
“method”: “spectrum.paws.init”,
“params”: {
“type”: “INIT_REQ”,
“version”: “1.0”,
“deviceDesc”: {
“serialNumber”: 20150907,
“manufacturerId”: “QMU”,
“modelId”: “virtual-radio”,
“rulesetIds”: [ “ETSI-EN-301-598-1.1.1” ],
“etsiEnDeviceType”: “A”,
“etsiEnDeviceCategory”: “master”,
“etsiEnDeviceEmissionsClass”: 5,
“etsiEnTechnologyId”: “wsTechnology”
},
“location”: {
“point”: {
“center”: {
“latitude”: 51.507611,
“longitude”: -0.111162
},
“semiMajorAxis”: 0,
“semiMinorAxis”: 0,
“orientation”: 0
},
“confidence”: 95
},
“antenna”: {
“height”: 15,
“heightType”: “AGL”,
“heightUncertainty”: 0
}
},
“id”: 0
}
AND the URL is:
https://wsdb-deviceapi.thingzone.uk
Any help is appreciated.
Powell