title: Post Json Data as Query String of a webrequest
body: <p>In my scenario my API handles the json reading it as </p>
  
  <pre><code>if (context.Request.Files.Count &gt; 0)   
         {
              jsonData = context.Request.Params["key"]; 
         }
  </code></pre>
  
  <p>from my application how can i send a web request to this api without json as query string parameter. Sine Json is lengthy and i know query string is limited.</p>
  
  <p>For android an ios this api works fine.</p>
  
  <p>i have tried to add it to the header. but in vain.</p>
  
  <p>how can i add it so that "jsonData = context.Request.Params["key"]; " will get my json.
  my request format is here.</p>
  
  <pre><code>            urlS="http://abc.ashx?Key="+jsonRequestS;
              string boundary = "----------------------------" + DateTime.Now.Ticks.ToString("x");
              var webRequest1 = (HttpWebRequest)WebRequest.Create(urlS);
              webRequest1.Method = "POST";
              webRequest1.KeepAlive = false;
              webRequest1.ContentType =string.Format("multipart/form-data; boundary={0}", boundary);//                
              Stream postDataStream1 = handler.GetPostStream(boundary,jsonRequestS);               // Writes boundary and files to memory stream.
  
              webRequest1.ContentLength = postDataStream1.Length;
              Stream reqStream1 = webRequest1.GetRequestStream();
  
              postDataStream1.Position = 0;
  
              var bufferBytes = new byte[postDataStream1.Length];
              postDataStream1.Read(bufferBytes, 0, bufferBytes.Length);
              reqStream1.Write(bufferBytes, 0, bufferBytes.Length);
  
              postDataStream1.Close();
              reqStream1.Close();
  
              var sReader = new StreamReader(webRequest1.GetResponse().GetResponseStream());//here Am getting the error.
              string resultS = sReader.ReadToEnd();
  </code></pre>
  
  <p>Thanks in advance.</p>