Page 1 of 1

Loging in with http.

Posted: 14 Feb 2019 21:54
by x32
When you send the first command to vlc through the http interface you are asked to log in like in the attached pic. It seems to only ask for a log in for the first command of each session.

Code: Select all

http://127.0.0.1:8080/requests/status.xml?command=pl_pause

Is it possible to send the loging information in the url? Either for an initial log in or add the information to every command? I have tried a few different ways with no luck.

Code: Select all

http://127.0.0.1:8080/user=_password=1234/requests/status.xml?command=pl_pause
This one is something close to how I used to access my old email account but I can't make it work with vlc.

Any ideas??? Thanks

Image

Re: Loging in with http.

Posted: 15 Feb 2019 09:37
by chubinou
hi,

it depends about what you use to make your queries,

for instance, with wget, you can user the form

Code: Select all

wget --user= --password=pasword http://localhost:8080/requests/status.xml
with firefox, this form works

Code: Select all

http://%00:password@localhost:8080/requests/status.xml

Re: Loging in with http.

Posted: 15 Feb 2019 20:21
by x32
Thanks. That does indeed work with Firefox but it isn't working with my scripts. I'm trying to redo a AutoHotKey script I wrote many years ago, before VLC version 2. A complete command would look like this...

Code: Select all

cmd = http://127.0.0.1:8080/requests/status.xml?command=pl_pause UrlDownloadToVar(cmd)
The control commands actually still work if you don't use a password in VLC, but it does not return the status information. I used to parse that information to retrieve the values of volume, position,... ect.

Now that I've seen the status return in Firefox, using this new command, I'm not sure the information I need to retrieve is returned. At this point I probably need to learn to use one of the other interfaces. I'm guessing the RC interface would be best to use from another application, would that be correct?