[vlc-devel] [RFC] http post

Pierre Ynard linkfanel at yahoo.fr
Mon Mar 28 04:03:15 CEST 2011

> Some modules need http post for external APIs, like SD or lua
> extensions.

Does this include C modules? Does it involve uploading of data blobs,
HTTP form encoding? GET requests with no body? REST APIs? SOAP?

> What is the correct way to implement this, without coding it 20 times in
> different places? Where should it go: core, 1 special module, code in
> every module, something else?

To begin with, what's the run context? Making random remote access to
third-party services isn't really pervasive among modules, it's made
from a couple interface threads like the audioscrobbler module, which
already does HTTP POST and seems fine enough?

Then, as for lua, we established that the current socket handling was a
mess. Also, it doesn't provide UDP sockets. So that's another question
to answer.

Given how HTTP is a text protocol, lua seems suited enough. Depending
on the case and the relative level of quality required by the given
purpose, it looks like it could be done in a couple lines of lua. Also,
there must be basic lua libraries lying around, can't these be used as
needed, rather than relying on the core as a general purpose library?

Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."

More information about the vlc-devel mailing list