Scroll to navigation

builtins/http/globus_xio_http.h(3) globus_xio builtins/http/globus_xio_http.h(3)

NAME

builtins/http/globus_xio_http.h - Globus XIO HTTP Driver Header.

SYNOPSIS

#include 'globus_xio.h'

Data Structures


struct globus_xio_http_header_t
HTTP Header.

Enumerations


enum globus_xio_http_handle_cmd_t { GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HEADER, GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_STATUS_CODE, GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_REASON_PHRASE, GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HTTP_VERSION, GLOBUS_XIO_HTTP_HANDLE_SET_END_OF_ENTITY, GLOBUS_XIO_HTTP_HANDLE_SET_REQUEST_HEADER }
enum globus_xio_http_attr_cmd_t { GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_METHOD, GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HTTP_VERSION, GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HEADER, GLOBUS_XIO_HTTP_ATTR_DELAY_WRITE_HEADER, GLOBUS_XIO_HTTP_GET_REQUEST, GLOBUS_XIO_HTTP_GET_RESPONSE }
enum globus_xio_http_errors_t { GLOBUS_XIO_HTTP_ERROR_INVALID_HEADER, GLOBUS_XIO_HTTP_ERROR_PARSE, GLOBUS_XIO_HTTP_ERROR_NO_ENTITY, GLOBUS_XIO_HTTP_ERROR_EOF, GLOBUS_XIO_HTTP_ERROR_PERSISTENT_CONNECTION_DROPPED }
enum globus_xio_http_version_t { }

Functions


globus_result_t globus_xio_handle_cntl (handle, driver, GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HEADER, const char *header_name, const char *header_value)
globus_result_t globus_xio_handle_cntl (handle, driver, GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_STATUS_CODE, int status)
globus_result_t globus_xio_handle_cntl (handle, driver, GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_REASON_PHRASE, const char *reason)
globus_result_t globus_xio_handle_cntl (handle, driver, GLOBUS_XIO_HTTP_HANDLE_SET_RESPONSE_HTTP_VERSION, globus_xio_http_version_t version)
globus_result_t globus_xio_handle_cntl (handle, driver, GLOBUS_XIO_HTTP_HANDLE_SET_END_OF_ENTITY)
globus_result_t globus_xio_attr_cntl (attr, driver, GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_METHOD, const char *method)
globus_result_t globus_xio_attr_cntl (attr, driver, GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HTTP_VERSION, globus_xio_http_version_t version)
globus_result_t globus_xio_attr_cntl (attr, driver, GLOBUS_XIO_HTTP_ATTR_SET_REQUEST_HEADER, const char *header_name, const char *header_value)
globus_result_t globus_xio_attr_cntl (attr, driver, GLOBUS_XIO_HTTP_ATTR_DELAY_WRITE_HEADER)
globus_result_t globus_xio_data_descriptor_cntl (dd, driver, GLOBUS_XIO_HTTP_GET_REQUEST, char **method, char **uri, globus_xio_http_version_t *http_version, globus_hashtable_t *headers)
globus_result_t globus_xio_data_descriptor_cntl (dd, driver, GLOBUS_XIO_HTTP_GET_RESPONSE, int *status_code, char **reason_phrase, globus_xio_http_version_t *http_version, globus_hashtable_t *headers)

Detailed Description

Globus XIO HTTP Driver Header.

Function Documentation

globus_result_t globus_xio_attr_cntl (attr, driver, GLOBUS_XIO_HTTP_ATTR_DELAY_WRITE_HEADER)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Delay writing HTTP request until first data write.

If this attribute is present when opening an HTTP handle, the HTTP request will not be sent immediately upon opening the handle. Instead, it will be delayed until the first data write is done. This allows other HTTP headers to be sent after the handle is opened.

This attribute cntl takes no arguments.

globus_result_t globus_xio_data_descriptor_cntl (dd, driver, GLOBUS_XIO_HTTP_GET_REQUEST, char ** method, char ** uri, globus_xio_http_version_t * http_version, globus_hashtable_t * headers)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Get HTTP Request Information.

Returns in the passed parameters values concerning the HTTP request. Any of the parameters may be NULL if the application is not interested in that part of the information.

Parameters

method Pointer to be set to the HTTP request method (typically GET, PUT, or POST). The caller must not access this value outside of the lifetime of the data descriptor nor free it.
uri Pointer to be set to the requested HTTP path. The caller must not access this value outside of the lifetime of the data descriptor nor free it.
http_version Pointer to be set to the HTTP version used for this request.
headers Pointer to be set to point to a hashtable of globus_xio_http_header_t values, keyed by the HTTP header names. The caller must not access this value outside of the lifetime of the data descriptor nor free it or any values in it.

globus_result_t globus_xio_data_descriptor_cntl (dd, driver, GLOBUS_XIO_HTTP_GET_RESPONSE, int * status_code, char ** reason_phrase, globus_xio_http_version_t * http_version, globus_hashtable_t * headers)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Get HTTP Response Information

Returns in the passed parameters values concerning the HTTP response. Any of the parameters may be NULL if the application is not interested in that part of the information.

Parameters

status_code Pointer to be set to the HTTP response status code (such as 404), as per RFC 2616. The caller must not access this value outside of the lifetime of the data descriptor nor free it or any values in it.
reason_phrase Pointer to be set to the HTTP response reason phrase (such as Not Found). The caller must not access this value outside of the lifetime of the data descriptor nor free it or any values in it.
http_version Pointer to be set to the HTTP version used for this request.
headers Pointer to be set to point to a hashtable of globus_xio_http_header_t values, keyed by the HTTP header names. The caller must not access this value outside of the lifetime of the data descriptor nor free it or any values in it.

Author

Generated automatically by Doxygen for globus_xio from the source code.

Tue Jul 5 2022 Version 6.6