/usr/include/ossim/base/ossimHttpRequest.h is in libossim-dev 1.8.16-4ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | #ifndef ossimHttpRequest_HEADER
#define ossimHttpRequest_HEADER
#include <ossim/base/ossimObject.h>
#include <ossim/base/ossimWebRequest.h>
#include <ossim/base/ossimHttpResponse.h>
#include <ossim/base/ossimKeywordlist.h>
#include <ossim/base/ossimRefPtr.h>
class OSSIM_DLL ossimHttpRequest :public ossimWebRequest
{
public:
enum HttpMethodType
{
HTTP_METHOD_UNKNOWN = 0,
HTTP_METHOD_GET = 1,
HTTP_METHOD_POST = 2
// later we will add support for post
};
ossimHttpRequest()
:m_methodType(HTTP_METHOD_UNKNOWN)
{
}
bool set(const ossimUrl& url,
const ossimKeywordlist& headerOptions,
HttpMethodType methodType=HTTP_METHOD_GET)
{
bool result = setUrl(url);
m_headerOptions = headerOptions;
m_methodType = methodType;
return result;
}
virtual ~ossimHttpRequest()
{
}
void setHeaderOptions(const ossimKeywordlist& options)
{
m_headerOptions = options;
}
void addHeaderOption(const ossimString& name, const ossimString& value)
{
m_headerOptions.add(name, value);
}
void clearHeaderOptions(){m_headerOptions.clear();}
ossimKeywordlist& getHeaderOptions(){return m_headerOptions;}
const ossimKeywordlist& getHeaderOptions()const{return m_headerOptions;}
virtual ossimString getLastError()const{return m_lastError;}
virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
protected:
ossimKeywordlist m_headerOptions;
HttpMethodType m_methodType;
TYPE_DATA;
};
#endif
|