Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2015-03-06 11:56:28 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2bcb4f811c627b985ceb739e68edd9c9452a7f1c
2bcb4f81
1 parent
964e4be9
refine http.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
26 行增加
和
0 行删除
trunk/src/app/srs_app_http.hpp
trunk/src/app/srs_app_http.hpp
查看文件 @
2bcb4f8
...
...
@@ -483,20 +483,43 @@ public:
public
:
virtual
u_int8_t
method
();
virtual
u_int16_t
status_code
();
/**
* method helpers.
*/
virtual
std
::
string
method_str
();
virtual
bool
is_http_get
();
virtual
bool
is_http_put
();
virtual
bool
is_http_post
();
virtual
bool
is_http_delete
();
virtual
bool
is_http_options
();
/**
* whether body is chunked encoding, for reader only.
*/
virtual
bool
is_chunked
();
/**
* the uri contains the host and path.
*/
virtual
std
::
string
uri
();
/**
* the url maybe the path.
*/
virtual
std
::
string
url
();
virtual
std
::
string
host
();
virtual
std
::
string
path
();
public
:
/**
* read body to string.
* @remark for small http body.
*/
virtual
int
body_read_all
(
std
::
string
&
body
);
/**
* get the body reader, to read one by one.
* @remark when body is very large, or chunked, use this.
*/
virtual
ISrsHttpResponseReader
*
body_reader
();
/**
* the content length, -1 for chunked or not set.
*/
virtual
int64_t
content_length
();
/**
* get the param in query string,
...
...
@@ -504,6 +527,9 @@ public:
* then query_get("start") is "100", and query_get("end") is "200"
*/
virtual
std
::
string
query_get
(
std
::
string
key
);
/**
* get the headers.
*/
virtual
int
request_header_count
();
virtual
std
::
string
request_header_key_at
(
int
index
);
virtual
std
::
string
request_header_value_at
(
int
index
);
...
...
请
注册
或
登录
后发表评论