globus_connect_gridftp_server  16.11
Functions
API Functions

Functions

globus_result_t globus_dsi_rest_request (const char *method, const char *uri, const globus_dsi_rest_key_array_t *query_parameters, const globus_dsi_rest_key_array_t *headers, const globus_dsi_rest_callbacks_t *callbacks)
 Perform a REST request. More...
 
globus_result_t globus_dsi_rest_uri_add_query (const char *uri, const globus_dsi_rest_key_array_t *query_parameters, char **complete_urip)
 Add query parameters to a URI base string. More...
 
globus_result_t globus_dsi_rest_uri_escape (const char *s, char **escaped)
 Escape a string. More...
 

Detailed Description

Function Documentation

◆ globus_dsi_rest_request()

globus_result_t globus_dsi_rest_request ( const char *  method,
const char *  uri,
const globus_dsi_rest_key_array_t query_parameters,
const globus_dsi_rest_key_array_t headers,
const globus_dsi_rest_callbacks_t *  callbacks 
)

Perform a REST request.

Parameters
[in]methodThe HTTP method to invoke for the resource. Typically one of "GET", "PUT", "POST", "PATCH", "DELETE", or "HEAD".
[in]uriThe URI of the web resource to access.
[in]query_parametersAdditional query parameters to append to the request. This may be NULL. If any query parameter names or values are NULL, they are ignored.
[in]headersAdditional HTTP headers to append to the request. Other headers may be added to the request by the DSI REST Helper API.
[in]callbacksCallbacks to call when processing this request.

◆ globus_dsi_rest_uri_add_query()

globus_result_t globus_dsi_rest_uri_add_query ( const char *  uri,
const globus_dsi_rest_key_array_t query_parameters,
char **  complete_urip 
)

Add query parameters to a URI base string.

Encodes the query_parameters key-value pairs using the HEX+ encoding for a URI query string, and appends the result to uri, storing the result in the storage pointed to by complete_urip.

Parameters
[in]uriThe base URI string.
[in]query_parametersPointer to the query parameters.
[out]complete_uripPointer to store the resulting URI string in.
Returns
On success, return GLOBUS_SUCCESS and modifies complete_urip to point the new URI. Caller is responsible for freeing that string. Otherwise, return an error result.

◆ globus_dsi_rest_uri_escape()

globus_result_t globus_dsi_rest_uri_escape ( const char *  s,
char **  escaped 
)

Escape a string.

Encodes the s parameter the HH encoding for non-alphanumeric characters and replacing ' ' with +.

Parameters
[in]sThe original string.
[out]escapedPointer to store the resulting escaped value in.
Returns
On success, return GLOBUS_SUCCESS and modifies escaped to point the new string. Caller is responsible for freeing that string. Otherwise, return an error result.