mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
HTTP API support JSONP by specifies the query string callback=xxx.
This commit is contained in:
parent
aeebddb269
commit
6e5143449e
6 changed files with 148 additions and 74 deletions
|
@ -81,14 +81,6 @@ class ISrsHttpResponseWriter;
|
|||
extern int srs_go_http_error(ISrsHttpResponseWriter* w, int code);
|
||||
extern int srs_go_http_error(ISrsHttpResponseWriter* w, int code, std::string error);
|
||||
|
||||
// helper function: response in json format.
|
||||
extern int srs_http_response_json(ISrsHttpResponseWriter* w, std::string data);
|
||||
/**
|
||||
* response a typical code object, for example:
|
||||
* {code : 100}
|
||||
*/
|
||||
extern int srs_http_response_code(ISrsHttpResponseWriter* w, int code);
|
||||
|
||||
// get the status text of code.
|
||||
extern std::string srs_generate_http_status_text(int status);
|
||||
|
||||
|
@ -497,6 +489,7 @@ public:
|
|||
virtual std::string url() = 0;
|
||||
virtual std::string host() = 0;
|
||||
virtual std::string path() = 0;
|
||||
virtual std::string query() = 0;
|
||||
virtual std::string ext() = 0;
|
||||
/**
|
||||
* get the RESTful id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue