Added PUT support
This commit is contained in:
@@ -19,6 +19,7 @@ namespace fr
|
||||
Unknown = 0,
|
||||
Get = 1,
|
||||
Post = 2,
|
||||
Put = 3,
|
||||
RequestTypeCount = 3,
|
||||
};
|
||||
enum RequestStatus
|
||||
|
||||
@@ -149,8 +149,13 @@ namespace fr
|
||||
//Check what it is
|
||||
if(str.compare(0, type_end, "GET") == 0)
|
||||
request_type = fr::Http::Get;
|
||||
else
|
||||
else if(str.compare(0, type_end, "POST") == 0)
|
||||
request_type = fr::Http::Post;
|
||||
else if(str.compare(0, type_end, "PUT") == 0)
|
||||
request_type = fr::Http::Put;
|
||||
else
|
||||
request_type = fr::Http::Unknown;
|
||||
|
||||
return;
|
||||
}
|
||||
throw std::invalid_argument("No known request type found in: " + str);
|
||||
|
||||
Reference in New Issue
Block a user