Sun Java System Access Manager 7 2005Q4 C API Reference

am_web_get_parameter_value()

Gets the value of the given query parameter from the given URL.

Syntax

#include "am_web.h"
AM_WEB_EXPORT am_status_t
am_web_get_parameter_value(const char *inpQuery, 
                           const char *param_name, char **param_value);

Parameters

This function takes the following parameters:

inpQuery

URL to look for the query parameter.

param_name

Name of the query parameter.

param_value

Pointer to be filled with the value of the param_name query parameter in the given URL if found.

The returned parameter value should be freed by the caller using am_web_free().

Returns

This function returns am_status_t with one of the following values:

AM_SUCCESS

If the query parameter was found in the URL.

AM_INVALID_ARGUMENT

If any of the arguments is NULL.

AM_NOT_FOUND

If the query parameter is not found.

AM_NO_MEMORY

If memory could not be allocated for the query parameter value.

AM_FAILURE

If any other error occurred.