Class Reference
IRIS for UNIX 2024.1.2
InterSystems: The power behind what matters   
Documentation  Search
  [USER] >  [%Net] >  [HttpResponse]
Private  Storage   

class %Net.HttpResponse extends %RegisteredObject

This class encapsulates the response from the web server.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
10 5


Summary

Properties
ContentBoundary ContentInfo ContentLength ContentType
Data Headers HttpVersion ReasonPhrase
StatusCode StatusLine

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
GetHeader GetNextHeader OutputHeaders OutputToDevice
SetHeader


Properties

• property ContentBoundary as %String;
If specified the boundary signal for the Data
• property ContentInfo as %String;
Additional information specified in the HTTP headers about the Data.
• property ContentLength as %String;
Length of the Data. Comes from the HTTP 'Content-Length:' header.
• property ContentType as %String;
Value of the HTTP 'Content-Type:' header.
• property Data as %RawString;

For information on using this class, see Sending HTTP Requests.

The stream or a string contains all the data sent by the web server after the HTTP headers. You can test if this is a stream with $isobject(response.Data) and if it is not a stream then it is a string with the data in it.
• property Headers as %String [ MultiDimensional ];
Storage for the HTTP headers in the reply.
• property HttpVersion as %String;
The version of HTTP that the server supports.
• property ReasonPhrase as %String;
This is the human readable reason that goes with the StatusCode.
• property StatusCode as %Integer;
The HTTP status code. This is useful to determine if the request was successful. Look in the rfc for HTTP to see which codes are supported and what they mean. A human readable form of this code is stored as the ReasonPhrase
• property StatusLine as %String;
The HTTP status line. This is the first line of the response and signals if the request was successful or if there was a problem.

Methods

• method GetHeader(name As %String) as %String
Get the value associated with this header.
• method GetNextHeader(name As %String) as %String
Return the name of the next header that was received from the web server.
• method OutputHeaders(test As %Boolean = 0)
Output the HTTP headers from the web server to the current device. The headers will not be in the same order but this does not alter the semantics.
• method OutputToDevice()
Output the full response from the web server to the current device. The headers will not be in the same order but this does not alter the semantics. This is useful to see what the web server sent back.
• method SetHeader(name As %String, value As %String)
Used internally to set a header name and value. This can also be called externally if you want to record another header value.


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.