- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
access content of Web Page Box?
I get an error message when I access a REST API via load text file()
load text file ("http://api.open-notify.org/iss-now.json");
On the other hand, it works when I use web()
New Window("", web browser = Web Browser Box ( "http://api.open-notify.org/iss-now.json", JMP window ));
Is there a way to retrieve the JSON string via the Web Page Box?
web browser << Get text;
http://api.open-notify.org/iss-now.json
is just used to explain the difference. With this API both approaches work.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: access content of Web Page Box?
Next try:
save the content of the web page box and red the save file.
web browser << save ()
... but the saved file is empty: How to save webpages through JSL
So, I use Selenium to directly access my External Web Browser and send the commands.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: access content of Web Page Box?
Have you tried using New HTTP Request or Open?
Names Default To Here(1);
request = New HTTP Request(
URL("http://api.open-notify.org/iss-now.json"),
Method("GET")
);
data = request << Send;
aa = Parse JSON(data);
// dt = Open("http://api.open-notify.org/iss-now.json");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: access content of Web Page Box?
yes, I tried both.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: access content of Web Page Box?
Seems that web() is using the web browser of my system - with the benefit of getting the access.
On the other hand this might prevent us from accessing the content? [out of reach for JMP?]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: access content of Web Page Box?
Might be worth trying to figure out why New HTTP Request doesn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: access content of Web Page Box?
via Web(), it seems that JMP automatically inherits the permissions from the browser.
I just found:
https://community.jmp.com/t5/JMP-Wish-List/Additional-Wait-type-command/idi-p/626084
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: access content of Web Page Box?
Security setting prevent me from getting credentials via the embedded browser.
So I tried
oauth2 = New OAuth2( Browser Type( "External" ) );
This way, the authentication works - but I don't get a"code" or "URL" which I could enter here:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: access content of Web Page Box?
Next try:
save the content of the web page box and red the save file.
web browser << save ()
... but the saved file is empty: How to save webpages through JSL
So, I use Selenium to directly access my External Web Browser and send the commands.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: access content of Web Page Box?
To skip the Selenium part, is there some UseDefaultCredentials setting to use the credentials of my user account to access the files?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: access content of Web Page Box?
I would guess there is a cookie stored somewhere which you might be able to utilize. Are you able to contact the developers of the API and ask for them to create endpoint which could be used with some other authentication method?