Click here to Skip to main content
15,884,739 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting below error in testing postman.I OFF SSL also

The requested resource could not be found but may be available again in the future. Subsequent requests by the client are permissible


<pre>after giving this route attribute in class level i cannot test in postman like http://localhost:9001/SaveData and my save is  NOT working

but in swager its automaticaly take /Test/SaveData and my save is working

 

how to configure my post man to test? below is my method in controller


What I have tried:

[ApiController]
[Route("Test")]
public class TestDataController : ControllerBase
{
	private readonly ITestData _RegressionTestData;

	public TestDataController(ITestData TestData)
	{
		_TestData = TestData;
	}

	[HttpPost("SaveData")]
	public async Task SaveData([FromBody] DataModel input)
	{
		if (input == null)
		{
			return new JsonResult("Data input error, please review!");
		}

		var result = await _TestData.SaveData(input);

		return new JsonResult(result);
	}
}
Posted
Updated 17-Jun-21 22:21pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900