SFML - Simple and Fast Multimedia Library
Main Page
Namespaces
Classes
Files
Class List
Class Index
Class Hierarchy
Class Members
sf::Http
sf::Http Class ReferenceThis class provides methods for manipulating the HTTP protocol (described in RFC 1945).
More...
#include <Http.hpp>
Inheritance diagram for sf::Http:
List of all members.
Classes
class Request
This class wraps an HTTP request, which is basically :
a header with a method, a target URI, and a set of field/value pairsan optional body (for POST requests).
More...
class Response
This class wraps an HTTP response, which is basically :
a header with a status code and a set of field/value pairsa body (the content of the requested resource).
More...
Public Member Functions
Http ()
Default constructor.
Http (const std::string &Host, unsigned short Port=0)
Construct the Http instance with the target host.
void SetHost (const std::string &Host, unsigned short Port=0)
Set the target host.
Response SendRequest (const Request &Req, float Timeout=0.f)
Send a HTTP request and return the server's response.
Detailed Description
This class provides methods for manipulating the HTTP protocol (described in RFC 1945).
It can connect to a website, get its files, send requests, etc.
Definition at line 45 of file Http.hpp.
Constructor & Destructor Documentation
sf::Http::Http
(
)
Default constructor.
Definition at line 307 of file Http.cpp.
sf::Http::Http
(
const std::string &
Host,
unsigned short
Port = 0
)
Construct the Http instance with the target host.
Parameters:
Host : Web server to connect to
Port : Port to use for connection (0 by default -- use the standard port of the protocol used)
Definition at line 318 of file Http.cpp.
Member Function Documentation
Http::Response sf::Http::SendRequest
(
const Request &
Req,
float
Timeout = 0.f
)
Send a HTTP request and return the server's response.
You must be connected to a host before sending requests. Any missing mandatory header field will be added with an appropriate value. Warning : this function waits for the server's response and may not return instantly; use a thread if you don't want to block your application.
Parameters:
Req : Request to send
Timeout : Maximum time to wait, in seconds (0 by default, means no timeout)
Returns:Server's response
You must be connected to a host before sending requests. Any missing mandatory header field will be added with an appropriate value. Warning : this function waits for the server's response and may not return instantly; use a thread if you don't want to block your application.
Definition at line 366 of file Http.cpp.
void sf::Http::SetHost
(
const std::string &
Host,
unsigned short
Port = 0
)
Set the target host.
Parameters:
Host : Web server to connect to
Port : Port to use for connection (0 by default -- use the standard port of the protocol used)
Definition at line 327 of file Http.cpp.
The documentation for this class was generated from the following files:
Http.hppHttp.cpp
:: Copyright © 2007-2008 Laurent Gomila, all rights reserved ::
Documentation generated by doxygen 1.5.2 ::
Wyszukiwarka
Podobne podstrony:
classsf 1 1Http 1 1Request membersclasssf 1 1Http 1 1Requestclasssf 1 1Http membersclasssf 1 1Http 1 1Response membersclasssf 1 1Http 1 1Responseclasssf 1olorclasssf 1rawableclassscript connector 1 1net problemclasssf 1 1View membersclasssf 1 1Window membersclasssf 1 1SocketUDP membersclasssf 1 1Vector3 membersclasssf 1 1SoundBuffer membersclasssf 1 1Unicode membersclasssf 1 1Vector3classsf 1 1Listenerclasssf 1 1VideoModeclasssf 1 1SoundBufferRecorder memberswięcej podobnych podstron