description | title | ms.date | ms.assetid |
---|---|---|---|
Learn more about: <webHttpEndpoint> |
<webHttpEndpoint> |
03/30/2017 |
ecaaeb6f-ebd0-411d-8b53-92477cd45347 |
This configuration element defines a standard endpoint with a fixed <webHttpBinding> binding that automatically adds the <webHttp> behavior. Use this endpoint when writing a REST service.
<configuration>
<system.serviceModel>
<standardEndpoints>
<webHttpEndpoint>
<system.serviceModel>
<standardEndpoints>
<webHttpEndpoint>
<standardEndpoint automaticFormatSelectionEnabled="String"
defaultOutgoingResponseFormat="Xml/Json"
helpEnabled="Boolean"
webEndpointType="String" />
</webHttpEndpoint>
</standardEndpoints>
</system.serviceModel>
The following sections describe attributes, child elements, and parent elements.
Attribute | Description |
---|---|
automaticFormatSelectionEnabled | A Boolean value that indicates whether automatic format selection is enabled. When automatic format selection is enabled, the infrastructure parses the Accept header of the request message and determines the most appropriate response format. If the Accept header does not specify a suitable response format, the infrastructure uses the Content-Type of the request message or the default response format of the operation. |
defaultOutgoingResponseFormat | An attribute that specifies the default outgoing response format. This attribute is of the xref:System.ServiceModel.Web.WebMessageFormat type |
helpEnabled | A Boolean value that indicates whether the HTTP help page is enabled for the endpoint. |
webEndpointType | A string that specifies the type of the endpoint. |
None.
Element | Description |
---|---|
<standardEndpoints> | A collection of standard endpoints that are pre-defined endpoints with one or more of their properties (address, binding, contract) fixed. |
- xref:System.ServiceModel.Description.WebHttpEndpoint
- xref:System.ServiceModel.Configuration.WebHttpEndpointElement