.htpasswd - javascript authenticate with htpasswd and fetch json -


i have api generates json, problem password protected url, using apache htpasswd.

how can authenticate , retrieve json javascript, since methods have tried give me access deined (i've been using http://username:passwd@urldotcom/path/to/stuff)

thanks

i figured out how it.

 var = jquery.ajax({     type: "get",     url: url,     username: "user",     password: "password"     }); 

url variable declared earlier of format http:///path/to/json


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -