Jump to main content

##

# TCPIP_HTTP_NET_URLDecode Function

## C

    uint8_t* TCPIP_HTTP_NET_URLDecode(
        uint8_t* cData
    );

## Description

This function parses a string from URL encoding to plain text. The following conversions are made: ‘=’ to ‘0’, ‘&’ to ‘0’, ‘+’ to ‘ ‘, and “%xx” to a single hex byte. After completion, the data has been decoded and a null terminator signifies the end of a name or value. A second null terminator (or a null name parameter) indicates the end of all the data.

## Preconditions

The data parameter is null terminated and has at least one extra byte free.

## Parameters

Parameters | Description
--- | ---
cData | The string which is to be decoded in place.

## Returns

- A pointer to the last null terminator in data, which is also the first free byte for new data.

## Remarks

This function is called by the stack to parse GET arguments and cookie data. User applications can use this function to decode POST data, but first need to verify that the string is null-terminated.