download - Adding basic authentication to a simple HTML href link -


i using smartgwt, , want download file server, sending request using href link , download file need basic authentication , possible add basic authentication simple html href ?

the href link looks

string exportlink =  "<a href=\"" +restlet/api/user/getusers +  "\"" + constants.href_style + ">"+download+"</a>"; 

your link need have following form:

https://username:password@example.com/path 

after clicking on link, browser user given username+password authenticate server. please have in mind, publish username+password user.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -