HTTP Endpoint and Cross-Origin Site
-
Hello,
I'm continuing to work on a web app that can upload .gcode files to my machine. However, I've been unable to connect with my machine through HTTP requests. What is the correct formatting for an endpoint for this API? I currently have it like so:
http://xxx.xxx.x.xx/api/files/gcodes but didn't have too much confidence in that.
Additionally, I noticed M586 has a C variable for setting the site of cross-origin HTTP requests. Can I use this to set it to that exact same endpoint or how is the C variable effectively used in this case?
-
-
-
@JRCL You can use
M586 C"*"
to permit all cross-origin requests, e.g. from your HTTP dev setup running on localhost. HTTP requests are documented for standalone and SBC mode. OpenAPI definitions are available on the repos as well. -
@chrishamm I'm sorry I'm not much of a software engineer so pardon my ignorance, I'll need some additional clarification. Would the C"site" be the site requesting the HTTP post like the backend of my app, like a localhost:3000? Or whats a correct "site" if not?
-
-
@chrishamm Thank you! I didn't realize you could literally use an asterisk. I thought it was a placeholder
-