How to wget localhost:8080/requests/status.xml

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
elsa
New Cone
New Cone
Posts: 5
Joined: 22 Nov 2018 03:49

How to wget localhost:8080/requests/status.xml

Postby elsa » 22 Nov 2018 04:04

When i leave password empty, the page localhost:8080/ said:
Password for Web interface has not been set.

Please use --http-password, or set a password in

Preferences > All > Main interfaces > Lua > Lua HTTP > Password.
detail: https://wiki.videolan.org/documentation ... ss_control
how to set password(diagram): https://hobbyistsoftware.com/vlcsetup-win-manual

Because there were not username at all, only password.

Code: Select all

wget http://username:password@localhost:8080/
not work.

My VLC version is 3.0.4

chubinou
Developer
Developer
Posts: 521
Joined: 23 Jul 2015 15:19

Re: How to wget localhost:8080/requests/status.xml

Postby chubinou » 22 Nov 2018 09:54

hello:

this should works:

Code: Select all

wget --user= --password=pasword http://localhost:8080/

elsa
New Cone
New Cone
Posts: 5
Joined: 22 Nov 2018 03:49

Re: How to wget localhost:8080/requests/status.xml

Postby elsa » 22 Nov 2018 12:37

Thanks a lot, solved! :)))))))))))))))))))))

elsa
New Cone
New Cone
Posts: 5
Joined: 22 Nov 2018 03:49

Re: How to wget localhost:8080/requests/status.xml

Postby elsa » 22 Nov 2018 12:40

In case you want to use Ajax, you can try below:

Code: Select all

$.ajax({ type: "GET", url: "http://localhost:8080/requests/status.json", dataType: 'json', password: 2333, success: function (data){ console.log(data) } });

elsa
New Cone
New Cone
Posts: 5
Joined: 22 Nov 2018 03:49

Re: How to wget localhost:8080/requests/status.xml

Postby elsa » 22 Nov 2018 12:52

In case you want to use isomorphic-fetch, you may try below:

Code: Select all

require('isomorphic-fetch') let port = 8080 let password = 2333 fetch(`http://:${password}@localhost:${port}/requests/status.json`) .then(function(response) { if (response.status >= 400) { throw new Error("Bad response from server") } return response.json() }) .then(function(data) { console.log(data) }) .catch(e => console.log(e))

SimPune
Blank Cone
Blank Cone
Posts: 10
Joined: 25 Dec 2018 18:43

Re: How to wget localhost:8080/requests/status.xml

Postby SimPune » 03 Jan 2019 12:04

Here is one example of calling web service from Linux shell by sending HTTP GET request using cURL command:

$ curl http://api.openweathermap.org/data/2.5/ ... 61b657fb6f
{"coord":{"lon":-0.13,"lat":51.51},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}],"base":"stations","main":{"temp":282,"pressure":1022,"humidity":87,"temp_min":277.15,"temp_max":285.15},"visibility":10000,"wind":{"speed":1.5},"clouds":{"all":90},"dt":1445577409,"sys":{"type":1,"id":5093,"message":0.0201,"country":"GB","sunrise":1445582275,"sunset":1445619056},"id":2643743,"name":"London","cod":200}

User avatar
John Aeliya
New Cone
New Cone
Posts: 4
Joined: 14 Feb 2019 09:52

Re: How to wget localhost:8080/requests/status.xml

Postby John Aeliya » 15 Feb 2019 07:45

On my machine LabVIEW Web Services is using port 8080. When I run the VLC Status Request VI I can see that LabVIEW Web Services are responding with a 404 by looking at the response headers, ie the header "Server: Embedthis-http" is included.



When I launch VLC with a different port https://wiki.videolan.org/documentation ... _and_later

And modify the VLC Status Request VI to use a different port then the request seems to come from VLC (xml data about what is currently playing).



To see what vlc.exe is doing with port 8080 I ran netstat -a -b from an elevated command prompt and saw the following:

...

TCP 0.0.0.0:8080 mycomputername:0 LISTENING
[ApplicationWebServer.exe]

...

TCP [::]:8080 mycomputername:0 LISTENING
[vlc.exe]

...


From that it looks like LabVIEW Web Services are running on the ipv4 localhost on port 8080 and the VLC Server was running on the ipv6 localhost on port 8080. And indeed when using Chrome Developer Tools on the network tab you can look at one of the requests and see that the Remote Address for the requests are an ipv6 "[::1]:8080".


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 15 guests