Tizen Native API
5.0
|
It manages custom header.
Required Header
#include <http.h>
Overview
It manages custom header.
Functions | |
int | http_transaction_header_add_field (http_transaction_h http_transaction, const char *field_name, const char *field_value) |
Adds a named field to header. | |
int | http_transaction_header_remove_field (http_transaction_h http_transaction, const char *field_name) |
Removes the named field from header. | |
int | http_transaction_header_get_field_value (http_transaction_h http_transaction, const char *field_name, char **field_value) |
Gets the HTTP Header Field value from custom header. |
Function Documentation
int http_transaction_header_add_field | ( | http_transaction_h | http_transaction, |
const char * | field_name, | ||
const char * | field_value | ||
) |
Adds a named field to header.
Adds a named field, which is a <fieldName
, fieldValue>
pair, to the current instance of HTTP Transaction.
- Since :
- 3.0
- Parameters:
-
[in] http_transaction The HTTP transaction handle [in] field_name The HTTP Header Field name [in] field_value The HTTP Header Field value
- Returns:
0
on success, otherwise negative error value
- Return values:
-
HTTP_ERROR_NONE Successful HTTP_ERROR_INVALID_PARAMETER Invalid parameter HTTP_ERROR_INVALID_OPERATION Invalid operation HTTP_ERROR_NOT_SUPPORTED Not Supported
int http_transaction_header_get_field_value | ( | http_transaction_h | http_transaction, |
const char * | field_name, | ||
char ** | field_value | ||
) |
Gets the HTTP Header Field value from custom header.
- Since :
- 3.0
- Remarks:
- The field_value should be freed using free().
- Parameters:
-
[in] http_transaction The HTTP transaction handle [in] field_name The HTTP Header Field name [out] field_value The HTTP Header Field value
- Returns:
0
on success, otherwise negative error value
- Return values:
-
HTTP_ERROR_NONE Successful HTTP_ERROR_INVALID_PARAMETER Invalid parameter HTTP_ERROR_INVALID_OPERATION Invalid operation HTTP_ERROR_NOT_SUPPORTED Not Supported
int http_transaction_header_remove_field | ( | http_transaction_h | http_transaction, |
const char * | field_name | ||
) |
Removes the named field from header.
Remove the named field, which is a <fieldName
, fieldValue>
pair, from the current instance of HTTP Transaction.
- Since :
- 3.0
- Parameters:
-
[in] http_transaction The HTTP transaction handle [in] field_name The HTTP Header Field name
- Returns:
0
on success, otherwise negative error value
- Return values:
-
HTTP_ERROR_NONE Successful HTTP_ERROR_INVALID_PARAMETER Invalid parameter HTTP_ERROR_INVALID_OPERATION Invalid operation HTTP_ERROR_NOT_SUPPORTED Not Supported