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_transactionThe HTTP transaction handle
[in]field_nameThe HTTP Header Field name
[in]field_valueThe HTTP Header Field value
Returns:
0 on success, otherwise negative error value
Return values:
HTTP_ERROR_NONESuccessful
HTTP_ERROR_INVALID_PARAMETERInvalid parameter
HTTP_ERROR_INVALID_OPERATIONInvalid operation
HTTP_ERROR_NOT_SUPPORTEDNot 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_transactionThe HTTP transaction handle
[in]field_nameThe HTTP Header Field name
[out]field_valueThe HTTP Header Field value
Returns:
0 on success, otherwise negative error value
Return values:
HTTP_ERROR_NONESuccessful
HTTP_ERROR_INVALID_PARAMETERInvalid parameter
HTTP_ERROR_INVALID_OPERATIONInvalid operation
HTTP_ERROR_NOT_SUPPORTEDNot 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_transactionThe HTTP transaction handle
[in]field_nameThe HTTP Header Field name
Returns:
0 on success, otherwise negative error value
Return values:
HTTP_ERROR_NONESuccessful
HTTP_ERROR_INVALID_PARAMETERInvalid parameter
HTTP_ERROR_INVALID_OPERATIONInvalid operation
HTTP_ERROR_NOT_SUPPORTEDNot Supported