title: Communicate with a REST service inside a REST service
body: <p>i use the following code to communicate with a REST service:</p>
  
  <pre><code>[ServiceContract()]
  interface ISomeService
  {
      [OperationContract()]
      [WebGet()]
      bool DoSomething();
  }
  
  WebHttpBinding binding = new WebHttpBinding();
  ChannelFactory&lt;ISomeService&gt; channelFactory = new ChannelFactory&lt;ISomeService&gt;(binding, "http://localhost:12000");
  channelFactory.Endpoint.Behaviors.Add(new WebHttpBehavior());
  ISomeService service = channelFactory.CreateChannel();
  service.DoSomething();
  </code></pre>
  
  <p>It works fine in simple test applications, but in my real application i want to call it inside my own REST service: If a call to my REST service is made, my service should make a call to another REST service.</p>
  
  <p>And there things go weird. In this situation the code above does not work because if it is placed inside a service method it sends a POST request instead of a GET request, which of course results in a "Method not allowed" error. I don't have the attribute WebInvoke anywhere in my code.</p>
  
  <pre><code>[ServiceContract()]
  class MainService
  {
      [OperationContract()]
      [WebGet()]
      public void Test()
      {
          CallDoSomething(); // code from above: Sends POST instead of GET request
      }
  }
  </code></pre>
  
  <p>How can it be that the HTTP request method changes?</p>