xxxxxxxxxx
the possibility is that you have use wong request type:GET instead of POST or something else
xxxxxxxxxx
//you can add these lines to the web.config:
<system.webServer>
<modules>
<remove name="WebDAVModule" />
</modules>
<handlers>
<remove name="WebDAV" />
</handlers>
</system.webServer>
xxxxxxxxxx
The HyperText Transfer Protocol (HTTP) 405 Method Not Allowed response
status code indicates that the request method is known by the server
but is not supported by the target resource.
xxxxxxxxxx
@RestController
@RequestMapping(value="/api")
public class RequestMethodController {
@Autowired
private EmployeeService service;
@RequestMapping(value = "/employees", produces = "application/json")
public List<Employee> findEmployees()
throws InvalidRequestException {
return service.getEmployeeList();
}
}
xxxxxxxxxx
{
"version": 2,
"extra_config": {},
"timeout": "3000ms",
"cache_ttl": "300s",
"output_encoding": "json",
"endpoints": [
{
"endpoint": "/testing",
"method": "POST",
"output_encoding": "json",
"extra_config": {},
"concurrent_calls": 1,
"backend": [
{
"url_pattern": "/posts",
"encoding": "json",
"sd": "static",
"method": "POST",
"extra_config": {},
"host": ["https://jsonplaceholder.typicode.com"],
"disable_host_sanitize": false,
"is_collection": false,
"target": ""
}
]
}
]
}