Reference documentation and code samples for the Stackdriver Error Reporting V1beta1 Client class HttpRequestContext.
HTTP request data that is related to a reported error.
This data should be provided by the application when reporting an error,
unless the
error report has been generated automatically from Google App Engine logs.
Generated from protobuf messagegoogle.devtools.clouderrorreporting.v1beta1.HttpRequestContext
Namespace
Google \ Cloud \ ErrorReporting \ V1beta1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ method
string
The type of HTTP request, such asGET,POST, etc.
↳ url
string
The URL of the request.
↳ user_agent
string
The user agent information that is provided with the request.
↳ referrer
string
The referrer information that is provided with the request.
↳ response_status_code
int
The HTTP response status code for the request.
↳ remote_ip
string
The IP address from which the request originated. This can be IPv4, IPv6, or a token which is derived from the IP address, depending on the data that has been provided in the error report.
getMethod
The type of HTTP request, such asGET,POST, etc.
Returns
Type
Description
string
setMethod
The type of HTTP request, such asGET,POST, etc.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getUrl
The URL of the request.
Returns
Type
Description
string
setUrl
The URL of the request.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getUserAgent
The user agent information that is provided with the request.
Returns
Type
Description
string
setUserAgent
The user agent information that is provided with the request.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getReferrer
The referrer information that is provided with the request.
Returns
Type
Description
string
setReferrer
The referrer information that is provided with the request.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getResponseStatusCode
The HTTP response status code for the request.
Returns
Type
Description
int
setResponseStatusCode
The HTTP response status code for the request.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getRemoteIp
The IP address from which the request originated.
This can be IPv4, IPv6, or a token which is derived from the
IP address, depending on the data that has been provided
in the error report.
Returns
Type
Description
string
setRemoteIp
The IP address from which the request originated.
This can be IPv4, IPv6, or a token which is derived from the
IP address, depending on the data that has been provided
in the error report.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Stackdriver Error Reporting V1beta1 Client - Class HttpRequestContext (0.23.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.23.1 (latest)](/php/docs/reference/cloud-error-reporting/latest/V1beta1.HttpRequestContext)\n- [0.23.0](/php/docs/reference/cloud-error-reporting/0.23.0/V1beta1.HttpRequestContext)\n- [0.22.10](/php/docs/reference/cloud-error-reporting/0.22.10/V1beta1.HttpRequestContext)\n- [0.21.1](/php/docs/reference/cloud-error-reporting/0.21.1/V1beta1.HttpRequestContext)\n- [0.20.2](/php/docs/reference/cloud-error-reporting/0.20.2/V1beta1.HttpRequestContext)\n- [0.19.12](/php/docs/reference/cloud-error-reporting/0.19.12/V1beta1.HttpRequestContext) \n| **Beta**\n|\n|\n| This library is covered by the [Pre-GA Offerings Terms](/terms/service-terms#1)\n| of the Terms of Service. Pre-GA libraries might have limited support,\n| and changes to pre-GA libraries might not be compatible with other pre-GA versions.\n| For more information, see the\n[launch stage descriptions](/products#product-launch-stages). \nReference documentation and code samples for the Stackdriver Error Reporting V1beta1 Client class HttpRequestContext.\n\nHTTP request data that is related to a reported error.\n\nThis data should be provided by the application when reporting an error,\nunless the\nerror report has been generated automatically from Google App Engine logs.\n\nGenerated from protobuf message `google.devtools.clouderrorreporting.v1beta1.HttpRequestContext`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ ErrorReporting \\\\ V1beta1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getMethod\n\nThe type of HTTP request, such as `GET`, `POST`, etc.\n\n### setMethod\n\nThe type of HTTP request, such as `GET`, `POST`, etc.\n\n### getUrl\n\nThe URL of the request.\n\n### setUrl\n\nThe URL of the request.\n\n### getUserAgent\n\nThe user agent information that is provided with the request.\n\n### setUserAgent\n\nThe user agent information that is provided with the request.\n\n### getReferrer\n\nThe referrer information that is provided with the request.\n\n### setReferrer\n\nThe referrer information that is provided with the request.\n\n### getResponseStatusCode\n\nThe HTTP response status code for the request.\n\n### setResponseStatusCode\n\nThe HTTP response status code for the request.\n\n### getRemoteIp\n\nThe IP address from which the request originated.\n\nThis can be IPv4, IPv6, or a token which is derived from the\nIP address, depending on the data that has been provided\nin the error report.\n\n### setRemoteIp\n\nThe IP address from which the request originated.\n\nThis can be IPv4, IPv6, or a token which is derived from the\nIP address, depending on the data that has been provided\nin the error report."]]