# PHTTPForm Class Reference

`#include <httpform.h>`

Inheritance diagram for PHTTPForm:

List of all members.

## Public Types

| CompleteHTML
| InsertIntoForm
| InsertIntoHTML
enum | BuildOptions { CompleteHTML, InsertIntoForm, InsertIntoHTML }

## Public Member Functions

| PHTTPForm (const PURL &url)
| PHTTPForm (const PURL &url, const PHTTPAuthority &auth)
| PHTTPForm (const PURL &url, const PString &html)
| PHTTPForm (const PURL &url, const PString &html, const PHTTPAuthority &auth)
virtual void | OnLoadedText (PHTTPRequest &request, PString &text)
| This is called after the text has been loaded and may be used to customise or otherwise mangle a loaded piece of text.
virtual PBoolean | Post (PHTTPRequest &request, const PStringToString &data, PHTML &replyMessage)
| Get a block of data (eg HTML) that the resource contains.
PHTTPField * | Add (PHTTPField *fld)
void | RemoveAllFields ()
void | BuildHTML (const char *heading)
void | BuildHTML (const PString &heading)
void | BuildHTML (PHTML &html, BuildOptions option=CompleteHTML)

## Protected Attributes

PHTTPCompositeField | fields
PStringSet | fieldNames

## Member Enumeration Documentation

enum PHTTPForm::BuildOptions

Enumerator:

  CompleteHTML |
  InsertIntoForm |
  InsertIntoHTML |

## Constructor & Destructor Documentation

PHTTPForm::PHTTPForm | ( | const PURL & | url | ) |

PHTTPForm::PHTTPForm | ( | const PURL & | url,
|  | const PHTTPAuthority & | auth |
| ) |  |  |

PHTTPForm::PHTTPForm | ( | const PURL & | url,
|  | const PString & | html |
| ) |  |  |

PHTTPForm::PHTTPForm | ( | const PURL & | url,
|  | const PString & | html,
|  | const PHTTPAuthority & | auth |
| ) |  |  |

## Member Function Documentation

PHTTPField* PHTTPForm::Add | ( | PHTTPField * | fld | ) |

void PHTTPForm::BuildHTML | ( | PHTML & | html,
|  | BuildOptions | option = `CompleteHTML` |
| ) |  |  |

void PHTTPForm::BuildHTML | ( | const PString & | heading | ) |

void PHTTPForm::BuildHTML | ( | const char * | heading | ) |

virtual void PHTTPForm::OnLoadedText | ( | PHTTPRequest & | request,
|  | PString & | text |
| ) |  |  | `[virtual]`

This is called after the text has been loaded and may be used to customise or otherwise mangle a loaded piece of text.

Typically this is used with HTML responses.

The default action for this function is to do nothing.

Parameters:

  request | Information on this request.
  text | Data used in reply.

Reimplemented from PHTTPResource.

Reimplemented in PHTTPConfig, PConfigPage, and PRegisterPage.

virtual PBoolean PHTTPForm::Post | ( | PHTTPRequest & | request,
|  | const PStringToString & | data,
|  | PHTML & | replyMessage |
| ) |  |  | `[virtual]`

Get a block of data (eg HTML) that the resource contains.

The default action for this function is to do nothing and return success.

Returns:
  true if the connection may persist, false if the connection must close

Parameters:

  request | Information on this request.
  data | Variables in the POST data.
  replyMessage | Reply message for post.

Reimplemented from PHTTPResource.

Reimplemented in PHTTPConfig, PConfigPage, and PRegisterPage.

void PHTTPForm::RemoveAllFields | ( |  | ) | `[inline]`

## Member Data Documentation

PStringSet PHTTPForm::fieldNames `[protected]`

PHTTPCompositeField PHTTPForm::fields `[protected]`

The documentation for this class was generated from the following file:

- httpform.h