Tizen Native API
6.5
|
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 Element.
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
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.
- Since :
- 3.0
- Parameters:
-
[in] http_transaction The HTTP transaction handle [out] status_code The HTTP status code
- 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_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_transaction The HTTP transaction handle [out] status_text The HTTP status text
- 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_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_transaction The HTTP transaction handle [out] version The HTTP version
- 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