Namespace: OpenEdge.Net
Class
FormEncoder
Parent classes:
Progress.Lang.Object

Inherits: Progress.Lang.Object

Copyright (c) 2022 by Progress Software Corporation. All rights reserved.
File:FormEncoder
Purpose:Provides encoding and decoding for application/x-www-form-urlencoded content
Author(s):pjudge
Created:2022-01-07
no tes : * Encoding taken from RFC1278 section 2.2
section 2.2:no n-alphanumeric characters are replaced by `%HH', a percent sign and two hexadecimal digits representing the ASCII code of the
character. Line breaks are represented as "CR LF" pairs (i.e., `%0D%0A').
pairs are separated from each other by `&'.




Method Summary
Options Name Purpose
LONGCHAR Decode (character) /* Decodes an encoded string Uses OpenEdge.Net.HTTP.PercentEncoder:Decode() to perform the decoding @param character An encoded string @return longchar A decoded string */
LONGCHAR Decode (character, character) /** Attempts to decode a previously-encoded string. Uses OpenEdge.Net.HTTP.PercentEncoder:Decode() to perform the decoding @param character The string to decode @param character The target codepage to encode into. @return character A decoded URL @throws AppError If the encoding is malformed */
CHARACTER Encode (longchar) /* Encodes a string using form encoding. Uses OpenEdge.Net.HTTP.PercentEncoder:Encode() to perform the encoding @param longchar The string to encode. This is longchar since it can handle unicode data even when the session can't. We dono t expect this to contain GB's of data. @return character A percent-encoded string */

Constructor Summary
Options Name Purpose
FormEncoder () /* Default constructor. */


Method Detail
Top

LONGCHAR Decode (character)

/* Decodes an encoded string
Uses OpenEdge.Net.HTTP.PercentEncoder:Decode() to perform the decoding
Parameters:
pData CHARACTER
Returns LONGCHAR
longchar A decoded string
Top

LONGCHAR Decode (character, character)

Purpose: Attempts to decode a previously-encoded string.
Uses OpenEdge.Net.HTTP.PercentEncoder:Decode() to perform the decoding
@throws AppError If the encoding is malformed
Parameters:
pData CHARACTER
pTargetCodepage CHARACTER
Returns LONGCHAR
character A decoded URL
Top

CHARACTER Encode (longchar)

/* Encodes a string using form encoding.
Uses OpenEdge.Net.HTTP.PercentEncoder:Encode() to perform the encoding
We dono t expect this to contain GB's of data.
Parameters:
pData LONGCHAR
Returns CHARACTER
character A percent-encoded string


Constructor Detail
Top

FormEncoder ()

/* Default constructor.


Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 12.5.0