I am trying to make POST request but Every Time I get error.
Body of my post request is as below :
Content-Disposition:form-data; name="request";
{
"recipients":["7778888"]
}
So I made request and my Post Data is as below :
string postData2 ="Content-Disposition:form-data; name=\"request\";" + Environment.NewLine + "{" + Environment.NewLine + "\"recipients\":[\"7778888\"]" + Environment.NewLine + "}";
But it didn't work and give me Invalid Recipient Value. I think I need to pass Recipient Values here as Array. How Can I pass "{" + Environment.NewLine + "\"recipients\":[\"7778888\"]" + Environment.NewLine + "}" as Array in this request ?
Content-Disposition
should be in the header, not in the body. b) Use a json parser instead of forming the string manually. – I4V Apr 22 at 17:01