Namespace: OpenEdge.Net.HTTP.Filter.Payload
Type: Class FormDataBodyWriter
Parent Classes:
Inherits: OpenEdge.Net.HTTP.Filter.Payload.MessageWriter


Copyright (c) 2015-2017, 2022 by Progress Software Corporation. All rights reserved.
File:FormDataBodyRequestFilter
Author(s):pjudge
Created:Thu Jan 29 10:47:13 EST 2015
Notes:- Supports String as an input type, since 11.5.1 has a bug where
the only way to send form data is via a String.
- This BodyWriter converts data from the following types into an
instance of OpenEdge.Core.ByteBucket
- OpenEdge.Core.String, Ccs.Common.Support.ICharacterHolder, Ccs.Common.Support.ILongcharHolder: no encoding
is done on this data; it is taken as-is
- OpenEdge.Core.Collections.IStringStringMap: encodes each name and value
- A BodyWriter is used by the ABL HTTP client to convert strongly-typed objects
into a raw message body (a byte representation), that is used for the
request.
- A BodyWriter is can be used by a WebHandler or the OpenEdge.Web.WebResponseWriter
to convert a strongly-typed object into a raw response body, that is sent back to
the client.



Method Summary
  Options Name Purpose
  Open () /* If nothing's passed in, use a bucket of our own. Don't do this in the constructor as a micro-optimisation (yes, I know) */
  INT64 Write (longchar) /* Writes character data as form data. This data is assumed to be form-encoded already @param longchar The form data @return int64 The number of bytes written. */
  INT64 Write (Object) /* Writes form data. Types accepted are - implements ILongcharHolder , ICharacterHolder: these are treated as longchar (ie assumed encoded) - implements IStringStringMap: the key and value are form-encoded before writing @param Object The form data @return int64 The number of bytes written. */

Constructor Summary
  Options Name Purpose
  FormDataBodyWriter () /* Default constructor */

Method Detail
Top

Open ()

/* If nothing's passed in, use a bucket of our own.
Don't do this in the constructor as a micro-optimisation (yes, I know)
Top

INT64 Write (longchar)

/* Writes character data as form data. This data is assumed to be form-encoded already
Parameters:
pcData LONGCHAR
 
Returns INT64
  int64 The number of bytes written.
Top

INT64 Write (Object)

/* Writes form data. Types accepted are
- implements ILongcharHolder , ICharacterHolder: these are treated as longchar (ie assumed encoded)
- implements IStringStringMap: the key and value are form-encoded before writing
Parameters:
poData Progress.Lang.Object
 
Returns INT64
  int64 The number of bytes written.


Constructor Detail
Top

FormDataBodyWriter ()

/* Default constructor