Jump to content


Photo

Simplest way to display local IP JSON data as a spreadsheet / html page on my PC?


  • Please log in to reply
21 replies to this topic

#21 g__day

g__day

    Champion

  • Hero
  • 7,832 posts

Posted 15 February 2017 - 08:27 PM

Many thanks so it's still a $.getJSON("URL?" Just add the ? At the end.

Is there any call you can make to the URLs to get it to tell you what authentication protocol it expects for its user id and password?

Otherwise it's try many different protocol modified URLs strings, tokens etc to attempt to see which is the correct method.

I have pinged a message to Enphase to see if they will reveal the correct method.

I will also try experimenting with the original type in the URL from a browser and try and add the user id and password in the call to see if I can find what structure of call works. Normally from a browser I enter the URL then it brings up a window asking for user id and password - enter the correct details and everything then works fine when you continually press refresh until you close the browser - so I guess it creates a session token or cookie somewhere that expires once the session closes? Wish there was a way is seeing exactly what happens and what it therefore expects!

Cheers,
Matt

Edited by g__day, 15 February 2017 - 10:37 PM.

Talent + Integrity = Atomic!

#22 g__day

g__day

    Champion

  • Hero
  • 7,832 posts

Posted 21 February 2017 - 07:58 AM

Still waiting Enphase's response...

 

Reading up on different means to pass credentials I came across this... what do you think - should this be merged into your code somehow?

 

$,getJSON({ 'url' : 'http://host.com/action' 'othersettings' : 'othervalues ', 'beforesend' : function(xhr) {

// May need to use the string Authorization instead of Authentication

  xhr, setRequestHeader("Authentication", "Basic " + encodeBase64(username + ":" + password)},

  success: Function(result) { alert('done'); } });

 

Its mind boggling that it is so challenging to pass the user name and password to a URL when it's not all executed in a browser.

 

If I execute the URL from Chrome and press debug - will I see how it invokes and confirms the credentials - or will this be hidden server side code?

 

Cheers,

  Matt


Talent + Integrity = Atomic!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users