asp.net web api - Web Api : Sending XML request through POSTMAN always gives null object -
i using postman extension , trying send xml post request web api.
sample model:
[datacontract(namespace = "")] public class employee { [datamember] [range(10000, 99999)] public int id { get; set; } [datamember] public string firstname { get; set; } [datamember] [required] [maxlength(20)] public string lastname { get; set; } }
while executing request getting null employee object in post method of controller.
if send json request works fine.
i tried providing namespace in datacontract attribute didn't work.
Comments
Post a Comment