34 lines
726 B
C++
34 lines
726 B
C++
#include "IMFRequest.h"
|
|
#include "Exception.h"
|
|
#include "Log.h"
|
|
|
|
namespace coreutils {
|
|
|
|
IMFRequest::IMFRequest(ZString &in) : ZString(in) {
|
|
setZString(in.goeol());
|
|
split(" ");
|
|
}
|
|
|
|
ZString IMFRequest::getMethod() {
|
|
if(getList().size() == 3)
|
|
return getList()[0];
|
|
else
|
|
throw Exception("Error in parsing client request.");
|
|
}
|
|
|
|
ZString IMFRequest::getURI() {
|
|
if(getList().size() == 3)
|
|
return getList()[1];
|
|
else
|
|
throw Exception("Error in parsing client request.");
|
|
}
|
|
|
|
ZString IMFRequest::getProtocol() {
|
|
if(getList().size() == 3)
|
|
return getList()[2];
|
|
else
|
|
throw Exception("Error in parsing client request.");
|
|
}
|
|
|
|
}
|