Open Inventor Release 2024.1.2
 
Loading...
Searching...
No Matches
HTTPRequest.h
1/*=======================================================================
2*** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3*** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4*** ***
5*** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6*** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7*** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8*** ***
9*** RESTRICTED RIGHTS LEGEND ***
10*** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11*** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12*** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13*** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14*** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15*** ***
16*** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, ***
17*** BORDEAUX, FRANCE ***
18*** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20
21#pragma once
22
23#include <Inventor/sys/port.h>
24#include <RemoteViz/Rendering/LibHelper.h>
25
26#include <memory>
27#include <string>
28
29namespace RemoteViz
30{
31 namespace Rendering
32 {
33 class HTTPRequestImpl;
34 class HTTPHeaders;
35 class Uri;
36
48 class RENDERSERVICE_API HTTPRequest
49 {
50 public:
51
56
60 HTTPRequest(const std::string& method, const std::string& uri, int versionMajor, int versionMinor);
61
65 HTTPRequest(const std::string& method, const std::string& uri, int versionMajor, int versionMinor, const HTTPHeaders& headers);
66
71
76
81
85 const Uri& getURI() const;
86
90 const std::string& getMethod() const;
91
93
96 const std::string& getVersion() const;
97
102 int getVersionMajor() const;
103
108 int getVersionMinor() const;
110
112
116 int64_t getContentLength() const;
117
121 const std::string& getContentType() const;
122
126 const std::string& getHost() const;
127
131 const HTTPHeaders& getHeaders() const;
133
134 private:
137 std::shared_ptr<HTTPRequestImpl> getImpl() const;
140 private:
142 std::shared_ptr<HTTPRequestImpl> pImpl;
143 };
144
145 }
146}
<a href="IconLegend.html"><img src="extRV.gif" alt="RemoteViz" border="0"></a>
Definition HTTPHeaders.h:49
<a href="IconLegend.html"><img src="extRV.gif" alt="RemoteViz" border="0"></a>
Definition HTTPRequest.h:49
const HTTPHeaders & getHeaders() const
Returns HTTP headers.
HTTPRequest(const HTTPRequest &obj)
Copy constructor.
HTTPRequest(const std::string &method, const std::string &uri, int versionMajor, int versionMinor, const HTTPHeaders &headers)
Creates a HTTP request with the given method, URI (Uniform Resource Identifier), version and headers.
HTTPRequest & operator=(const HTTPRequest &obj)
Copy assignment operator.
const std::string & getVersion() const
Returns the HTTP version for incoming request (example "HTTP/1.1").
const std::string & getContentType() const
Returns the value of the Content-Type header field.
HTTPRequest(const std::string &method, const std::string &uri, int versionMajor, int versionMinor)
Creates a HTTP request with the given method, URI (Uniform Resource Identifier) and version.
HTTPRequest()
Creates a GET / HTTP/1.1 HTTP request.
int getVersionMinor() const
HTTP uses a "major.minor" numbering scheme to indicate versions of the protocol.
int getVersionMajor() const
HTTP uses a "major.minor" numbering scheme to indicate versions of the protocol.
int64_t getContentLength() const
Returns the value of the Content-Length header field.
const Uri & getURI() const
Returns the URI (Uniform Resource Identifier) being requested.
const std::string & getMethod() const
Returns the request method ("GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS",...
const std::string & getHost() const
Returns the value of the Host header field.
<a href="IconLegend.html"><img src="extRV.gif" alt="RemoteViz" border="0"></a>
Definition Uri.h:50