myMPD
Internal API documentation
Loading...
Searching...
No Matches
interface_http.c File Reference

Lua interface for http. More...

#include "compile_time.h"
#include "src/scripts/interface_http.h"
#include "src/lib/cache/cache_disk.h"
#include "src/lib/config_def.h"
#include "src/lib/filehandler.h"
#include "src/lib/http_client.h"
#include "src/lib/http_client_cache.h"
#include "src/lib/log.h"
#include "src/lib/mem.h"
#include "src/lib/mimetype.h"
#include "src/lib/sds_extras.h"
#include "src/lib/validate.h"
#include "src/scripts/interface.h"
#include <string.h>
Include dependency graph for interface_http.c:

Functions

int lua_http_client (lua_State *lua_vm)
 
int lua_http_download (lua_State *lua_vm)
 
int lua_http_serve_file (lua_State *lua_vm)
 
int lua_http_serve_http_cache_file (lua_State *lua_vm)
 

Detailed Description

Lua interface for http.

Function Documentation

◆ lua_http_client()

int lua_http_client ( lua_State *  lua_vm)

Simple HTTP client for lua

Parameters
lua_vmlua instance
Returns
number of variables on the stack with the response

◆ lua_http_download()

int lua_http_download ( lua_State *  lua_vm)

Downloads a file via http

Parameters
lua_vmlua instance
Returns
number of variables on the stack with the response

◆ lua_http_serve_file()

int lua_http_serve_file ( lua_State *  lua_vm)

Function that creates a http reply to send a file

Parameters
lua_vmlua instance
Returns
number of elements pushed to lua stack

◆ lua_http_serve_http_cache_file()

int lua_http_serve_http_cache_file ( lua_State *  lua_vm)

Function that creates a http reply from the http client cache

Parameters
lua_vmlua instance
Returns
number of elements pushed to lua stack