---
name: "globus_xio_data_descriptor_cntl"
section: "3"
platform: "linux"
package: "libglobus-xio-doc"
version: "6.6-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_xio_http.h"
---

# globus\_xio\_data\_descriptor\_cntl(3)

Globus XIO HTTP Driver Header.

Part of [globus\_xio\_http.h(3)](/globus_xio_http.h/3.md).

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