Usina BRAdvPL Guide
Sign in
← All topics
CLASSUnder review

FWHttpHeaderResponseParser

Interprets an HTTP response header.

FWHttpHeaderResponseParserAdvPL
01 · OVERVIEW

Overview

This helper is coupled to FWHttpHeaderResponse and documented as unsuitable for standalone use. New/Parser signatures repeat the owner class name, an inconsistency requiring source verification before direct invocation. This adaptation uses public FWHttpHeaderResponse:Activate without constructing the parser directly. cCodErr/Error are named diagnostics without invented formats or codes. (Sources: refs. 1–2.)

Methods

FWHttpHeaderResponse:ActivateParses through the owner object.oResponse:Activate(cHeader)
FWHttpHeaderResponse:GetStatusCodeReads status as text.oResponse:GetStatusCode() --> cStatus
FWHttpHeaderResponse:DeActivateReleases activated state.oResponse:DeActivate()
03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed430()
    Local oResponse := FWHttpHeaderResponse():New()
    Local cHeader := "HTTP/1.1 204 No Content" + Chr(13)+Chr(10) + "Content-Length: 0" + Chr(13)+Chr(10)+Chr(13)+Chr(10)
    // Synthetic input without HttpGet or credentials.
    oResponse:Activate(cHeader)
    ConOut(oResponse:GetStatusCode())
    oResponse:DeActivate()
    FreeObj(oResponse)
Return Nil
Expected result

Expected text code: 204; no HTTP request. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Check LIB version, lifecycle and context before integration. These methods are a documented subset rather than the complete API.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. FWHttpHeaderResponseParser. TDN. Accessed on 2026-10-27.
  2. TOTVS. FWHttpHeaderResponse. TDN. Accessed on 2026-10-27.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha