You are developing a Windows Communication Foundation (WCF) client application.<br /> The client application contains the following code.<br /> <br /> [ServiceContract]<br /> public interface ISocialStatus<br /> {<br /> [OperationContract]<br /> [WebInvoke(UriTemplate = "/statuses/update.xml?status-{text}")]<br /> void UpdateStatus(string text);<br /> }<br /> public class SocialClient : ClientBase<isocialstatus>, ISocialStatus<br /> {<br /> ...<br /> }<br /> The configuration file contains the following lines.<br /> <system.servicemodel><client><endpoint address="http://contoso.com" br="" name="SocialClient">binding="webHttpBinding" contract="SocialApp.ISocialStatus"<br /> bindingConfiguration="BindingConfig" /></endpoint></client></system.servicemodel><br /> You need to ensure that the service is consumed.<br /> Which code segment should you use?()</isocialstatus>
A、var client = new SocialClient("SocialClient"); client.Endpoint.Behaviors.Add(new WebHttpBehavior());
B、var client = new SocialClient("SocialClient"); client.Endpoint.Behaviors.Add(new WebScriptEnablingBehovior());
C、var client = new SocialClient("POST"); client.Endpoint.Behaviors.Add(new WebHttpBehovior());
D、var client = new SocialClient("POST"); client.Endpoint.Behaviors.Add(new WebScriptEnablingBehavior());