Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HttpRequestMessageProperty::SuppressEntityBody Property

 

Gets or sets a value that indicates whether the body of the message is ignored and only the headers are sent.

Namespace:   System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public:
property bool SuppressEntityBody {
	bool get();
	void set(bool value);
}

Property Value

Type: System::Boolean

true if the message body is suppressed; otherwise, false. The default is false.

This property is used for empty message requests: for example, a service that accepts a GET request without a message body. In this case, when building the HttpRequestMessageProperty object for the response message, set the SuppressEntityBody property to true.

When interoperating with non-WCF services, it is important to note that certain verbs are expected to contain a message body according to the HTTP standard; these include PUT and POST. Other verbs are expected to suppress the message body; these include GET and HEAD.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show:
© 2017 Microsoft