Tizen Native API
6.0
|
It manages custom header.
Required Header
#include <http.h>
Overview
It manages custom header.
Related Features
This API is related with the following features:
- http://tizen.org/feature/network.internet
It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature Element.
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