title: wcf restful web service with post method
body: <p>I'm developing on asp.net using vs2017; I'm working on a web service now. 
  I have a problem with wcf rest web service ,
  I used below code for connecting to web service with GET method.</p>
  
  <pre><code> [OperationContract]
      [WebInvoke(Method = "GET",
          ResponseFormat = WebMessageFormat.Json,
          BodyStyle = WebMessageBodyStyle.Wrapped,
          UriTemplate = "json/{id}")]
      string JSONData(string id);
  </code></pre>
  
  <p>and now I want to change method to "POST" . How can I send parameters with this method?</p>
  
  <p>in client side </p>
  
  <pre><code>&lt;form id="form1" action="RestServiceWareHouse.svc/jsonUserLogin"  method="post"&gt;
      &lt;div&gt;
          &lt;input id="id" name="id" type="text" /&gt;
          &lt;input id="pass" name="pass" type="text" /&gt;
          &lt;input id="Submit1" type="submit" value="submit" /&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>But I can't send parameters.</p>
  
  <p>in server side my function for auth users</p>
  
  <pre><code>  public string JSONDataLogin(string username,string password)
      {
          DataBaseConnectionClass GetUserList = new DataBaseConnectionClass();
          response = GetUserList.select("my select query are here");
  
  
  
          if (response.Rows.Count &gt; 0)
          {
              return js.Serialize("true");
          }
          return js.Serialize("no found");
      }
  </code></pre>
  
  <p>my code in GET method looks good, but in POST method I can't get parameters.</p>