Nebula
Loading...
Searching...
No Matches
httprequest.h
Go to the documentation of this file.
1#pragma once
2#ifndef HTTP_HTTPREQUEST_H
3#define HTTP_HTTPREQUEST_H
4//------------------------------------------------------------------------------
14#include "messaging/message.h"
15#include "http/httpmethod.h"
16#include "http/httpstatus.h"
17#include "io/uri.h"
18
19//------------------------------------------------------------------------------
20namespace Http
21{
55
56//------------------------------------------------------------------------------
59inline void
64
65//------------------------------------------------------------------------------
70{
71 return this->method;
72}
73
74//------------------------------------------------------------------------------
77inline void
79{
80 this->uri = u;
81}
82
83//------------------------------------------------------------------------------
86inline const IO::URI&
88{
89 return this->uri;
90}
91
92//------------------------------------------------------------------------------
95inline void
100
101//------------------------------------------------------------------------------
104inline const Ptr<IO::Stream>&
109
110//------------------------------------------------------------------------------
113inline void
118
119//------------------------------------------------------------------------------
122inline HttpStatus::Code
124{
125 return this->status;
126}
127
128} // namespace Http
129//------------------------------------------------------------------------------
130#endif
131
Code
http methods
Definition httpmethod.h:24
Encapsulates a complete Http request into a message.
Definition httprequest.h:23
__DeclareMsgId
Definition httprequest.h:25
__DeclareClass(HttpRequest)
virtual ~HttpRequest()
destructor
Definition httprequest.cc:27
HttpStatus::Code GetStatus() const
get the http status
Definition httprequest.h:123
void SetResponseContentStream(const Ptr< IO::Stream > &responseContentStream)
set the response content stream
Definition httprequest.h:96
void SetMethod(HttpMethod::Code requestMethod)
set the Http method (GET, PUT, etc...)
Definition httprequest.h:60
HttpMethod::Code GetMethod() const
get the Http method
Definition httprequest.h:69
void SetURI(const IO::URI &requestUri)
set the request URI
Definition httprequest.h:78
HttpRequest()
constructor
Definition httprequest.cc:17
const Ptr< IO::Stream > & GetResponseContentStream() const
get the response content stream
Definition httprequest.h:105
const IO::URI & GetURI() const
get the request URI
Definition httprequest.h:87
HttpMethod::Code method
Definition httprequest.h:50
IO::URI uri
Definition httprequest.h:51
void SetStatus(HttpStatus::Code status)
set the http status (set by HttpRequestHandler)
Definition httprequest.h:114
HttpStatus::Code status
Definition httprequest.h:53
Ptr< IO::Stream > responseContentStream
Definition httprequest.h:52
Code
status codes
Definition httpstatus.h:24
An URI object can split a Uniform Resource Identifier string into its components or build a string fr...
Definition uri.h:67
Messages are packets of data which can be sent to a message port.
Definition message.h:45
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
This file was generated with Nebula Trifid's idlc compiler tool.
Definition defaulthttprequesthandler.cc:15