Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
How would one go about fetching a file from a server protected by .htpasswd? — Gideros Forum

How would one go about fetching a file from a server protected by .htpasswd?

Unknown Member
edited May 2014 in General questions
I know how to fetch files, but there seems no way to get past the validation. Am I missing an obvious function? I have the credentials, of course.

Thanks in advance.

Comments

  • ar2rsawseenar2rsawseen Maintainer
    One way to try is:
    http://username:password@url.com

    or set header as:
    local header = {
        'Authorization: Basic '..base64_encode("user:password") 
    }
    Although I have not tried it, but you can try to use base64 encoding code from here:
    http://lua-users.org/wiki/BaseSixtyFour

    or any other lua base64 encoding lib out there :)

Sign In or Register to comment.