Bad request is likely to be the JSON message expected by the API doesn't match the one actually being sent. If this is the case, a breakpoint probably won't work as the object passed as a parameter into the
Check
method can't be created from the JSON. I say probably, but it depends exactly where your breakpoint is...
The big question is what does
CheckInput
actually look like as a type - if it doesn't conform to the JSON it won't work. My eye is drawn to the JSON you send via postman:
{
"productid": "2274",
"productcorenumber": "1321",
"value": "AE1C1F-0363-D6F-B3D-AE0029A8",
"contacts": [
15998,
1012
],
"ispassed": "0",
"isok": "0",
"isgood": "false"
}
productid
,
productcorenumber
are serialized as strings, but look like ints, similarly
isgood
is a string but looks like a bool, finally
ispassed
and
isok
have string values representing ints, but look like they are ought to be bools also. My
guess is either some custom work is being done for deserialization but not on serialization or vice versa - unless the properties on the
CheckInput
are actually strings.
If the object is using the expected data types (int and bool), without custom serialization the json should look more like:
{
"productid": 2274,
"productcorenumber": 1321,
"value": "AE1C1F-0363-D6F-B3D-AE0029A8",
"contacts": [
15998,
1012
],
"ispassed": 0,
"isok": 0,
"isgood": false
}
There are also different casing strategies for the property names, this might be fouling you up.
If you could add the type you are serializing/deserializing to you'll get more definite help.