#include "net.h"
#include "common.h"
Go to the source code of this file.
|
int | KSI_HttpClient_new (KSI_CTX *ctx, KSI_NetworkClient **http) |
|
int | KSI_AbstractHttpClient_new (KSI_CTX *ctx, KSI_NetworkClient **http) |
|
int | KSI_HttpClient_setPublicationUrl (KSI_NetworkClient *client, const char *val) |
|
int | KSI_HttpClient_setConnectTimeoutSeconds (KSI_NetworkClient *client, int val) |
|
int | KSI_HttpClient_setReadTimeoutSeconds (KSI_NetworkClient *client, int val) |
|
int | KSI_HttpClient_setExtender (KSI_NetworkClient *client, const char *url, const char *user, const char *key) |
|
int | KSI_HttpClient_setAggregator (KSI_NetworkClient *client, const char *url, const char *user, const char *key) |
|
int | KSI_HttpAsyncClient_new (KSI_CTX *ctx, KSI_AsyncClient **c) |
|
int | KSI_HttpAsyncClient_setService (KSI_AsyncClient *c, const char *url, const char *user, const char *pass) |
|
int | KSI_Http_init (KSI_CTX *ctx) |
|
Creates a new http client.
- Parameters
-
[in] | ctx | KSI context. |
[out] | http | Pointer to the receiving pointer. |
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
Initialize HTTP implementation globals.
- Parameters
-
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_HttpAsyncClient_setService |
( |
KSI_AsyncClient * |
c, |
|
|
const char * |
url, |
|
|
const char * |
user, |
|
|
const char * |
pass |
|
) |
| |
Setter for the HTTP service endpoint parameters.
- Parameters
-
[in] | c | Pointer to tcp async client. |
[in] | url | Host name. |
[in] | user | User name. |
[in] | pass | HMAC shared secret. |
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
- See also
- KSI_HttpAsyncClient_new
Creates a new http client.
- Parameters
-
[in] | ctx | KSI context. |
[out] | http | Pointer to the receiving pointer. |
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_HttpClient_setAggregator |
( |
KSI_NetworkClient * |
client, |
|
|
const char * |
url, |
|
|
const char * |
user, |
|
|
const char * |
key |
|
) |
| |
Setter for the http aggregator parameters.
- Parameters
-
[in] | client | Pointer to http client. |
[in] | url | Host URL. |
[in] | user | User name. |
[in] | key | HMAC shared secret. |
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
Setter for the connection timeout in seconds.
- Parameters
-
[in] | client | Pointer to the http client. |
[in] | val | Timeout in seconds. |
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_HttpClient_setExtender |
( |
KSI_NetworkClient * |
client, |
|
|
const char * |
url, |
|
|
const char * |
user, |
|
|
const char * |
key |
|
) |
| |
Setter for the http client extender parameters.
- Parameters
-
[in] | client | Pointer to http client. |
[in] | url | Host name. |
[in] | user | User name. |
[in] | key | HMAC shared secret. |
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_HttpClient_setPublicationUrl |
( |
KSI_NetworkClient * |
client, |
|
|
const char * |
val |
|
) |
| |
Setter for the publications file URL. The value will be copied and thus can be freed after successful call.
- Parameters
-
[in] | client | Pointer to the http client. |
[in] | val | Null-terminated URL. |
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
Setter for the read timeout in seconds.
- Parameters
-
[in] | client | Pointer to the http client. |
[in] | val | Timeout in seconds. |
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).