mirror of
https://github.com/SFML/SFML.git
synced 2024-12-01 15:51:04 +08:00
add HTTP support for PUT and DELETE
Signed-off-by: binary1248 <binary1248@hotmail.com>
This commit is contained in:
parent
5250cc97d5
commit
749cbb2ff8
@ -63,7 +63,9 @@ public :
|
|||||||
{
|
{
|
||||||
Get, ///< Request in get mode, standard method to retrieve a page
|
Get, ///< Request in get mode, standard method to retrieve a page
|
||||||
Post, ///< Request in post mode, usually to send data to a page
|
Post, ///< Request in post mode, usually to send data to a page
|
||||||
Head ///< Request a page's header only
|
Head, ///< Request a page's header only
|
||||||
|
Put, ///< Request in put mode, useful for a REST API
|
||||||
|
Delete ///< Request in delete mode, useful for a REST API
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
@ -111,6 +111,8 @@ std::string Http::Request::prepare() const
|
|||||||
case Get : method = "GET"; break;
|
case Get : method = "GET"; break;
|
||||||
case Post : method = "POST"; break;
|
case Post : method = "POST"; break;
|
||||||
case Head : method = "HEAD"; break;
|
case Head : method = "HEAD"; break;
|
||||||
|
case Put : method = "PUT"; break;
|
||||||
|
case Delete : method = "DELETE"; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write the first line containing the request type
|
// Write the first line containing the request type
|
||||||
|
Loading…
Reference in New Issue
Block a user