I am having a problem with the working of the api. Installing the api to iis executes "405". However, when running on localhost, it returns 200. I couldn't understand what should I do?
I am using postman for testing here is postman
It works when I try it on localhost
flutter codes
void TraSil() async {
try {
String uri = 'http://192.168.0.21/api/values/DegerSil/S00001/';
Uri ur = Uri.parse(uri);
final response =
await http.delete(ur).timeout(const Duration(seconds: 30));
if (response.statusCode == 200) {
print("Deleted");
} else {
throw response.reasonPhrase.toString();
}
} catch (e) {
_showMyDialog("Hata", e.toString());
}
}
I couldn't figure out where the problem came from. Do I need to give permission from somewhere? can you help?