The AddCustomer function works fine. Using Postman, I can supply the properties of the TCustomer class in my body and this passes through to the function perfectly.
With the UpdateCustomer function however, things get weird. It takes the same TCustomer class so I supply the exact same body in Postman, the only difference is that I’m also providing an account reference parameter in the URL itself too.
When I call UpdateCustomer, the accountref parameter is passed through but the TCustomer object is empty and contains none of the values from the body in my original call.
Clearly I’m doing something wrong when combining a URL parameter with a body parameter but can’t work out exactly what.
procedure TROAsyncContext.cbHeaderLine(aSender: TROAsyncSocket);
..
else begin
if (fRequest.Method = 'POST') or
(fRequest.Method = 'PUT') or
(fRequest.Method = 'PATCH') then begin // changed