title: Error "Cannot set null or blank methods on request." in WCF CustomBehavior
body: <p>I'm working on a WCF CustomBehavior that plugs into a BizTalk 2010 SendPort in order to call a JSON/REST service. The SendPort is WCF/Custom with Binding Type=webHttpBinding. </p>
  
  <p>I need to add the four headers to the request. </p>
  
  <p>When I include this code in my BeforeSendRequest method: </p>
  
  <pre><code>var newHttpRequestMessageProperty = new HttpRequestMessageProperty
  {
      Method = request.Headers.Action,
      QueryString = string.Empty,
      SuppressEntityBody = false,
  
  };
  
  newHttpRequestMessageProperty.Headers.Add("X-ST-PartnerID", partnerIDFromSSO);
  newHttpRequestMessageProperty.Headers.Add("X-ST-Token", tokenIDFromSSO);
  newHttpRequestMessageProperty.Headers.Add("X-ST-AuthType", "TOKEN");
  newHttpRequestMessageProperty.Headers.Add("Accept-Language", "EN");
  
  request.Properties[HttpRequestMessageProperty.Name] = newHttpRequestMessageProperty;
  </code></pre>
  
  <p>It gives me this error: </p>
  
  <pre><code>System.ArgumentException: Cannot set null or blank methods on request.
  Parameter name: value
  
  Server stack trace: 
     at System.Net.HttpWebRequest.set_Method(String value)
     at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.PrepareHttpSend(Message message)
     at System.ServiceModel.Channels.HttpOutput.BeginSendCore(HttpResponseMessage httpResponseMessage, TimeSpan timeout, AsyncCallback callback, Object state)
     at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelAsyncRequest.SendWebRequest()
     at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelAsyncRequest.OnGetWebRequestCompleted(IAsyncResult result)
     at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelAsyncRequest.BeginSendRequest(Message message, TimeSpan timeout)
     at System.ServiceModel.Channels.RequestChannel.BeginRequest(Message message, TimeSpan timeout, AsyncCallback callback, Object state)
     at System.ServiceModel.Dispatcher
  </code></pre>
  
  <p>When I leave that code out, I get a 415 back from the partner's web service, so I know that I'm getting there at least. </p>
  
  <p>What I'm doing is similar to this post: <a href="https://stackoverflow.com/questions/964433/how-to-add-a-custom-header-to-every-wcf-call">How to add a custom HTTP header to every WCF call?</a></p>