I was trying to get an ExtJS 2.2 JsonStore to send raw parameters to a WCF service. Catch-22 was that WCF doesn't accept raw params, and JsonStore seems to like to throw POSTs only (by default) when requesting data. And this breaks the deadlock. Very nice.

Edgardo Rossettoโ€™s Blog ๏ฟฝ Raw HTTP POST with WCF:

Hereโ€™s how you read the input Stream:

public void DoWork(Stream input)

{

StreamReader sr = new StreamReader(input);

string s = sr.ReadToEnd();

sr.Dispose();

NameValueCollection qs = HttpUtility.ParseQueryString(s);

string firstName = qs["firstName"];

string lastName = qs["lastName"];

// Do work here

}

Labels: ,