[[["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-08-28 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eHttpRequest\u003c/code\u003e class represents an HTTP request and is part of the \u003ccode\u003eGoogle.Rpc\u003c/code\u003e namespace within the \u003ccode\u003eGoogle.Api.CommonProtos.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"],["\u003cp\u003eIt implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, providing functionalities such as deep cloning and protocol buffer message handling.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eHttpRequest\u003c/code\u003e includes properties for the HTTP request's \u003ccode\u003eBody\u003c/code\u003e, \u003ccode\u003eHeaders\u003c/code\u003e, \u003ccode\u003eMethod\u003c/code\u003e, and \u003ccode\u003eUri\u003c/code\u003e, along with corresponding field numbers for each.\u003c/p\u003e\n"],["\u003cp\u003eConstructors are available to create a new \u003ccode\u003eHttpRequest\u003c/code\u003e object or to clone an existing one, and methods are provided to calculate message size, clone, compare, merge and convert to a string.\u003c/p\u003e\n"],["\u003cp\u003eSeveral versions of this exist, the latest version being 2.15.0, with previous versions being 2.10.0 and 2.2.0.\u003c/p\u003e\n"]]],[],null,["# Class HttpRequest (2.17.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.17.0 (latest)](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.HttpRequest)\n- [2.15.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.15.0/Google.Rpc.HttpRequest)\n- [2.10.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.10.0/Google.Rpc.HttpRequest)\n- [2.2.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.2.0/Google.Rpc.HttpRequest) \n\n public sealed class HttpRequest : IMessage\u003cHttpRequest\u003e, IEquatable\u003cHttpRequest\u003e, IDeepCloneable\u003cHttpRequest\u003e, IBufferMessage, IMessage\n\nRepresents an HTTP request. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e HttpRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[HttpRequest](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.HttpRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[HttpRequest](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.HttpRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[HttpRequest](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.HttpRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals)\n\nNamespace\n---------\n\n[Google.Rpc](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc)\n\nAssembly\n--------\n\nGoogle.Api.CommonProtos.dll\n\nConstructors\n------------\n\n### HttpRequest()\n\n public HttpRequest()\n\n### HttpRequest(HttpRequest)\n\n public HttpRequest(HttpRequest other)\n\nFields\n------\n\n### BodyFieldNumber\n\n public const int BodyFieldNumber = 4\n\nField number for the \"body\" field.\n\n### HeadersFieldNumber\n\n public const int HeadersFieldNumber = 3\n\nField number for the \"headers\" field.\n\n### MethodFieldNumber\n\n public const int MethodFieldNumber = 1\n\nField number for the \"method\" field.\n\n### UriFieldNumber\n\n public const int UriFieldNumber = 2\n\nField number for the \"uri\" field.\n\nProperties\n----------\n\n### Body\n\n public ByteString Body { get; set; }\n\nThe HTTP request body. If the body is not expected, it should be empty.\n\n### Descriptor\n\n public static MessageDescriptor Descriptor { get; }\n\n### Headers\n\n public RepeatedField\u003cHttpHeader\u003e Headers { get; }\n\nThe HTTP request headers. The ordering of the headers is significant.\nMultiple headers with the same key may present for the request.\n\n### Method\n\n public string Method { get; set; }\n\nThe HTTP request method.\n\n### Parser\n\n public static MessageParser\u003cHttpRequest\u003e Parser { get; }\n\n### Uri\n\n public string Uri { get; set; }\n\nThe HTTP request URI.\n\nMethods\n-------\n\n### CalculateSize()\n\n public int CalculateSize()\n\n### Clone()\n\n public HttpRequest Clone()\n\n### Equals(HttpRequest)\n\n public bool Equals(HttpRequest other)\n\n### Equals(object)\n\n public override bool Equals(object other)\n\n**Overrides** \n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object))\n\n### GetHashCode()\n\n public override int GetHashCode()\n\n**Overrides** \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)\n\n### MergeFrom(CodedInputStream)\n\n public void MergeFrom(CodedInputStream input)\n\n### MergeFrom(HttpRequest)\n\n public void MergeFrom(HttpRequest other)\n\n### ToString()\n\n public override string ToString()\n\n**Overrides** \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\n### WriteTo(CodedOutputStream)\n\n public void WriteTo(CodedOutputStream output)"]]