Motion - Feature Request 2008x 06x 14x 215505

Feature Request: HTTP interface: add switch for per-url RAW/HTML switch

Description

RAW/HTML is currently implemented via a config-file option. This should (could) be supported per request- for instance, like this: http://192.168.1.200:8080/1/config/list?output=raw http://192.168.1.200:8080/1/config/list?output=html

In other words, this is the control_html_output configfile option supported via CGI.

-- TedTimmons - 14 Jun 2008

Follow up

You can do it already :

motion 3.2.9 / 3.2.10.x

http://127.0.0.1:8080/0/config/set?control_html_output=off

http://127.0.0.1:8080/0/config/set?control_html_output=on

motion trunk

http://127.0.0.1:8080/0/config/set?webcontrol_html_output=on

http://127.0.0.1:8080/0/config/set?webcontrol_html_output=off

... or did you mean anything else ?

-- AngelCarpintero - 15 Jun 2008

Comments

Let me try to clarify what I mean. I am talking about changing it for one HTTP request, not changing the config via the HTTP interface for all future requests.

Does that make more sense?

-- TedTimmons - 15 Jun 2008


Ok i got your point , so you want i.ex to have control_html_ouput=on ( HTML ) but allow for a request get raw ... hmmm

I see a little problem , doing this introduces an extra work to parse request and not much profit on my opinion, look :

http://192.168.1.200:8080/1/config/list?output=html

http://192.168.1.200:8080/1/config/set?netcam_keepalive=off?output=raw

http://192.168.1.200:8080/1/config/get?query=minimum_frame_time?ouput=html

I don't really see a reason to have a double output mode on the fly , it's easy to set a mode and build a frontend using that mode.

Maybe i'm wrong , so please explain me what kind of magic thing are you trying to do , so this option is really wanted wink

Of course you can still doing with the current code doing 3 request ( change , request , restore ).

-- AngelCarpintero - 15 Jun 2008

You are right, the idea is to have a default and be able to change it on the fly. The reason is that I can build the frontend with "html" mode turned on for clarity, and so I don't have to worry about what the backend setting is. Sort of like looking at a blog in HTML versus getting an RSS (xml) feed. The "extra work" should be minimal- especially compared to reading the config file for the current state, right?

(and yes, it can be done with 3 requests, or 2 if I don't care to revert it to another setting)

-- TedTimmons - 16 Jun 2008


Ok , as is needed to rewrite the config to add range , web control will need also . I will add this option .

-- AngelCarpintero - 16 Jun 2008
Topic revision: r6 - 16 Jun 2008, AngelCarpintero
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.