Tizen Native API  3.0

It manages HTTP response.

Required Header

#include <http.h>

Overview

It manages HTTP response message.

  • Get status code and reason phrase from response message

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 List.

Functions

int http_transaction_response_get_status_code (http_transaction_h http_transaction, http_status_code_e *status_code)
 Gets the HTTP status code from HTTP Response.
int http_transaction_response_get_status_text (http_transaction_h http_transaction, char **status_text)
 Gets the HTTP status text from HTTP Response.
int http_transaction_response_get_version (http_transaction_h http_transaction, http_version_e *version)
 Gets the HTTP version from HTTP Response.

Function Documentation

Gets the HTTP status code from HTTP Response.

Since :
3.0
Parameters:
[in]http_transactionThe HTTP transaction handle
[out]status_codeThe HTTP status code
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_response_get_status_text ( http_transaction_h  http_transaction,
char **  status_text 
)

Gets the HTTP status text from HTTP Response.

Since :
3.0
Remarks:
The status_text should be freed using free().
Parameters:
[in]http_transactionThe HTTP transaction handle
[out]status_textThe HTTP status text
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_response_get_version ( http_transaction_h  http_transaction,
http_version_e version 
)

Gets the HTTP version from HTTP Response.

Since :
3.0
Parameters:
[in]http_transactionThe HTTP transaction handle
[out]versionThe HTTP version
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