I am trying to setup an API in WCF RESTful C# to accept POST form-data from a third party application. Using PHP, the receiving webpage would accept the variable and value through $_POST['TestVariable']
. The $_POST['TestVariable']
variable could be used within the page to perform other tasks. As with PHP and $_POST
, I would like the WCF RESTful C# API to accept the POST variable, through form-data, and display the POST value. We can perform this task with GET, but we are having issues with POST. I have been using Postman to test my changes with no luck. My question is, is it possible? If it is possible, can you provide a simple example that returns the TestVariable value I can use with Postman?
The code I have been working with is as follows:
public interface IMobileQC
{
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "GetTag/{PalletID}")]
ThirdPartyTagMainHeader GetTag(string PalletID);
}