P5 Authentication with loadJSON

I would like to access some data using loadJSON, but I need to add authentication.

http://p5js.org/reference/#/p5/loadJSON - reference page for loadJSON

Below is the cURL command for what I am trying to do.

curl -H 'Authorization: Basic mysecretinfolnM3QzOHdr' https://api.xively.com/v2/feeds/1316797213?datastreams="vbat"

Can you give an example?

Thanks much!

Sign In or Register to comment.