30 #ifndef PT_JSONRPC_HTTPCLIENT_H
31 #define PT_JSONRPC_HTTPCLIENT_H
33 #include <Pt/JsonRpc/Api.h>
34 #include <Pt/JsonRpc/Client.h>
35 #include <Pt/Http/Client.h>
36 #include <Pt/Connectable.h>
65 const std::string& url);
102 const std::string& url);
148 void setError(
bool f =
true)
171 #endif // PT_JSONRPC_HTTPCLIENT_H
Core module.
Definition: Allocator.h:33
virtual void onCancel()
Cancels the remote procedure call.
void setServiceUrl(const char *url)
Sets the service URL.
void setActive(System::EventLoop &loop)
Sets the EventLoop to use for I/O.
HTTP request message.
Definition: Request.h:44
HTTP reply message.
Definition: Reply.h:44
A client for JSON-RPC 2.0 remote procedure calls via HTTP.
Definition: HttpClient.h:48
void setKeepAlive()
Enables HTTP keep-alive.
virtual ~HttpClient()
Destructor.
System::EventLoop * loop() const
Gets the used EventLoop.
void setTarget(const Net::Endpoint &ep, const Net::TcpSocketOptions &opts, const std::string &url)
Sets target host and service URL.
const Net::Endpoint & host() const
Returns target host.
void setHost(const Net::Endpoint &ep, const Net::TcpSocketOptions &opts)
Sets host to connect.
void setPeerName(const std::string &peer)
Set expected SSL peer name.
HttpClient(System::EventLoop &loop)
Construct with EventLoop used for I/O.
void setServiceUrl(const std::string &url)
Sets the service URL.
Connection Management for Signal and Slot Objects.
Definition: Connectable.h:50
void setTarget(const Net::Endpoint &ep, const std::string &url)
Sets target host and service URL.
Represents a Network Host.
Definition: Endpoint.h:47
virtual void onInvoke()
Perform a synchronous invocation.
void setHost(const Net::Endpoint &ep)
Sets host to connect.
An HTTP client.
Definition: Client.h:78
A client for JSON-RPC 2.0 remote procedure calls.
Definition: Client.h:56
Thread-safe event loop supporting I/O multiplexing and Timers.
Definition: EventLoop.h:83
HttpClient(const Net::Endpoint &ep, const std::string &url)
Construct with host and service URL.
virtual void onBeginInvoke()
Begin an asynchronous invocation.
HttpClient(System::EventLoop &loop, const Net::Endpoint &ep, const std::string &url)
Construct with host and service URL.
void close()
Closes the connection.
virtual bool isFailed() const
Indicates if the procedure has failed.
void setSecure(Ssl::Context &ctx)
Sets SSL context.
TCP socket options.
Definition: TcpSocket.h:49
virtual void onEndInvoke()
End an asynchronous invocation.
void setTimeout(std::size_t timeout)
Sets timeout for I/O operations.
Context for SSL connections.
Definition: Context.h:80