This question is locked. New answers and comments are not allowed.
Sending multiple parameters to REST service created with wizard using POST
Hello,
I used the wizard to generate a WCF REST service, and the following is one of the generated methods.
I am trying to call this method, but not sure how to sending multiple parameters. I am testing with fiddler.
Here is a Call object that I have successfully sent to the OnAddItem(also generated by the wizard):
{"AccountId":"2012328001","CallCreated":"\/Date(1334214000000-0700)\/","CallStatus":"AC","CarNumber":"","CustomerName":"not AMANDA","CustomerPhone":"941.302.8611","DropoffAddress":"home","DropoffCity":"sarasotta","DropoffDate":"\/Date(00000-000)\/","DropoffState":"fl","DropoffZIP":"88449","Fare":-1,"Id":"2933","MilesDriven":-1,"PickupAddress":"55 north Madison st","PickupCity":"sarasotta","PickupDate":"\/Date(00-000)\/","PickupState":"FL","PickupZIP":"88333","Rate":0,"TravelTime":"0:00","TravelTimeTimeSpan":-1}
protected DispatchOADomainModel.Call OnUpdateItem(string id, DispatchOADomainModel.Call newValue)
{
try
{
this.dataManager.UpdateEntity(newValue);
return newValue;
}
catch (OpenAccessException)
{
throw new Exception(Convert.ToString(HttpStatusCode.BadRequest));
}
}
How can I send the 2 paramters: id and newValue using POST method?
Thank you in advance,
awni