- Jul 4, 2001
- 180
- 116
- 116
I have a Garmin Virb camera that has an API, and to use it you have to connect to the camera's WIFI access point. The access point assigns an IP address in the 192.168.0.x range, with the access point itself having the IP address 192.168.0.1.
To hit the API you make an HTTP POST request to http://192.168.0.1/virb. More details can be found here.
I decided to give it a try, so I made an html file on my local machine and put a script tag to make an ajax post to the Garmin Virb. I get this error:
On a normal web server you could set the Access-Control-Allow-Origin as needed, but in this case I do not have any means to configure the web server as it is a camera.
Any ideas how I can communicate with the camera's API via an ajax post from a local html file?
To hit the API you make an HTTP POST request to http://192.168.0.1/virb. More details can be found here.
I decided to give it a try, so I made an html file on my local machine and put a script tag to make an ajax post to the Garmin Virb. I get this error:
Code:
XMLHttpRequest cannot load http://192.168.0.1/virb. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access
On a normal web server you could set the Access-Control-Allow-Origin as needed, but in this case I do not have any means to configure the web server as it is a camera.
Any ideas how I can communicate with the camera's API via an ajax post from a local html file?