How to Create API Get Call w/opening a new window

I am trying to figure out how to make a API Get request with out opening a new window.

Currently i am using a hyper link that opens a new window. But i just want to create a button and have it send the GET request with out opening a link.

I have tried to mess with rules. But i am a newbie and having a hard time understanding it.

If any one has a link to another post or info that leads me in the right direction would be great.

Welcome to the community and thanks for posting. What kind of API is it? Is it something local on your network or something in the cloud?

Check out the following post for details on how to make REST API calls without opening a new browser window.

1 Like

Sorry i should have clarified that this is a REST API and it is on my local lan.

I will have a look at the link you provided.

Thank you.

Thank you for the info. I tried it a couple different ways and was unable to get it to work.

$.get("http://192.168.99.64/api/playlist/Stop/start")
$.get(http://192.168.99.64/api/playlist/Stop/start)

And also tried the , {“proxy”: true})

$.get(http://192.168.99.64/api/playlist/Stop/start, {"proxy": true})
$.get("http://192.168.99.64/api/playlist/Stop/start", {"proxy": true})

I and it does not work. Could be the unit i am trying to make the call too. But when i put 192.168.99.64/api/playlist/Stop/start in a url and hit return it fires off as it should. Either i am missing something compelety or the system i am trying to talk to does not like it coming from Sharptools. I can get it to work in a hyperlink but i have to have it open a new page or take over the 1 i was in.

Thanks for the help. I will keep pounding at it.

You will need to add a SSL certificate to your local REST server or have a proxy server with a valid SSL certificate to route the request. Otherwise the browser will not allow you to send a request from a SSL site (SharpTools) to a non SSL site (local HTTP server).

Might be able to just disable mixed content restrictions in Chrome or Fully or whatever browser youre using.

Chrome Google Chrome - Mixed Content - Media Not Showing

Fully Browser blocking media image requests - #3 by josh

1 Like

Thanks. I looked at the server that i am trying to send this too. And i did not see any thing about SSL Certs. And i dont know where to go about for proxy the request. So might just leave it their work with what i have.

Wish i knew more about this kinda of stuff. Something to research and try to understand.

Thank you.