Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading data from non-HTTPS sources #109

Closed
shiffman opened this issue Sep 23, 2016 · 2 comments
Closed

Loading data from non-HTTPS sources #109

shiffman opened this issue Sep 23, 2016 · 2 comments

Comments

@shiffman
Copy link
Member

I think this is related to p5-serial/p5.serialserver#33.

I was helping a student with a homework using data from a "moon phase" API: http://api.usno.navy.mil/moon/phase?date=9/23/2016&nump=1

The following code:

var data;
function preload() {
  data = loadJSON('http://api.usno.navy.mil/moon/phase?date=9/23/2016&nump=1');
}
function setup() {
}

results in this error:

screen shot 2016-09-23 at 2 06 27 pm

Is there anything we can do about this or is this something we have to live with for non HTTPS APIs?

@shiffman shiffman changed the title Issues loading data from not HTTPS sources Issues loading data from non-HTTPS sources Sep 23, 2016
@shiffman shiffman changed the title Issues loading data from non-HTTPS sources Loading data from non-HTTPS sources Sep 23, 2016
@catarak
Copy link
Member

catarak commented Sep 23, 2016

I tried this example on codepen, and I noticed that to solve this issue, Codepen serves their site in both http and https, except for login/signup. As a quick fix, I can serve the site in both http and https, and turn off redirecting http to https, and then figure out the login stuff later.

@shiffman
Copy link
Member Author

This can be closed now that amazing @catarak has enabled http and https. . . Just tested and the code works now! 🎉 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants