I have in my controller a post method like this:
public IActionResult Post([FromBody]string directoryPath)
{
_log.Debug($"Got ScanDirectory request for directoryPath:{directoryPath}");
if (string.IsNullOrEmpty(directoryPath))
{
return NotFound("DirectoryPath is empty");
}
}
when I am doing post via swagger/postman with body string "test" its working fine and directoryPath got the test string but when i'm posting a path like this: "C:\Users\futerm\Downloads\test" i got in directoryPath null.
Why i can't post with path i inside swagger?