I have created an webapi and send an empty string in webapi actionresult method. and have to check empty string check inside action method ,but empty string converted to below.
[Route("{product}/{name}")]
public IHttpActionResult GetName(string product,string Name)
{
var x = Name;
if(!string.IsNullOrEmpty(x)){
// do the logic
}
else{
}
return Ok(true);
}
why it is adding the empty as below format - format is "\"\""
webapi url be: http://localhost:60088/api/Name/GetName/Nokia/""