MarkLogic Connect
MarkLogic Connect Client API Collection
|
AuthenticatingProxy to handle authenticated calls to MarkLogic. More...
#include <AuthenticatingProxy.hpp>
Public Member Functions | |
AuthenticatingProxy () | |
void | addCredentials (const Credentials &c) |
const Credentials & | getCredentials (void) const |
Response * | getSync (const std::string &host, const std::string &path, const mlclient::HttpHeaders &headers=blankHeaders) |
Response * | postSync (const std::string &host, const std::string &path, const IDocumentContent &body, const mlclient::HttpHeaders &headers=blankHeaders) |
A Synchronous HTTP POST to a remote MarkLogic REST API URL. More... | |
Response * | multiPostSync (const std::string &host, const std::string &path, const DocumentSet &allContent, const long startPosInclusive, const long endPosInclusive, const mlclient::HttpHeaders &commonHeaders=blankHeaders) |
A Synchronous HTTP POST with multi part MIME content. More... | |
Response * | putSync (const std::string &host, const std::string &path, const IDocumentContent &body, const mlclient::HttpHeaders &headers=blankHeaders) |
A Synchronous HTTP PUT to a remote MarkLogic REST API URL. More... | |
Response * | deleteSync (const std::string &host, const std::string &path, const mlclient::HttpHeaders &headers=blankHeaders) |
A Synchronous HTTP DELETE to a remote MarkLogic REST API URL. More... | |
AuthenticatingProxy to handle authenticated calls to MarkLogic.
This class proxies the calls to MarkLogic, handling authentication as necessary. It includes both synchronous and asynchronous methods to allow users to select the method of invocation most suited to their application.
mlclient::internals::AuthenticatingProxy::AuthenticatingProxy | ( | ) |
Constructor
void mlclient::internals::AuthenticatingProxy::addCredentials | ( | const Credentials & | c | ) |
Add credentials to the authenticating proxy
c | The Credentials. |
Response* mlclient::internals::AuthenticatingProxy::deleteSync | ( | const std::string & | host, |
const std::string & | path, | ||
const mlclient::HttpHeaders & | headers = blankHeaders |
||
) |
A Synchronous HTTP DELETE to a remote MarkLogic REST API URL.
[in] | host | The hostname or IP Address to communicate with |
[in] | path | The URL path (E.g. /v1/documents) to invoke |
const Credentials& mlclient::internals::AuthenticatingProxy::getCredentials | ( | void | ) | const |
Returns a read-only copy of the credentials used by the proxy.
Response* mlclient::internals::AuthenticatingProxy::getSync | ( | const std::string & | host, |
const std::string & | path, | ||
const mlclient::HttpHeaders & | headers = blankHeaders |
||
) |
Invokes a synchronous GET operation on the MarkLogic server.
host | The hostname or IP address ("127.0.0.1") |
path | The path to invoke ("/v1/documents?uri=/foo/bar.xml") |
headers | The HTTP headers to include in the invocation |
Response* mlclient::internals::AuthenticatingProxy::multiPostSync | ( | const std::string & | host, |
const std::string & | path, | ||
const DocumentSet & | allContent, | ||
const long | startPosInclusive, | ||
const long | endPosInclusive, | ||
const mlclient::HttpHeaders & | commonHeaders = blankHeaders |
||
) |
A Synchronous HTTP POST with multi part MIME content.
[in] | host | The hostname or IP Address to communicate with |
[in] | path | The URL path (E.g. /v1/documents) to invoke |
[in] | body | The set of content to send as the POST body |
Response* mlclient::internals::AuthenticatingProxy::postSync | ( | const std::string & | host, |
const std::string & | path, | ||
const IDocumentContent & | body, | ||
const mlclient::HttpHeaders & | headers = blankHeaders |
||
) |
A Synchronous HTTP POST to a remote MarkLogic REST API URL.
[in] | host | The hostname or IP Address to communicate with |
[in] | path | The URL path (E.g. /v1/documents) to invoke |
[in] | body | The content to send as the POST body |
Response* mlclient::internals::AuthenticatingProxy::putSync | ( | const std::string & | host, |
const std::string & | path, | ||
const IDocumentContent & | body, | ||
const mlclient::HttpHeaders & | headers = blankHeaders |
||
) |
A Synchronous HTTP PUT to a remote MarkLogic REST API URL.
[in] | host | The hostname or IP Address to communicate with |
[in] | path | The URL path (E.g. /v1/documents) to invoke |
[in] | body | The content to send as the PUT body |