I took a look at this behaviour with Rene, and it seems that this is a bug or an error in the IOS. Specifically, we tried to configure OSPF and then to remove OSPF configuration using the DELETE HTTP command, and the configuration was removed successfully.
Configuring RIP was also successful, but when it came down to deleting the configuration, it would not be removed, so we go the same results as you.
Looking further into the problem, we found the following error messages generated on the CLI of the router:
*Mar 17 10:08:32.988: %DMI-5-AUTH_PASSED: R0/0: dmiauthd: User 'cisco' authenticated successfully from 10.82.100.188:0 and was authorized for rest over http. External groups: PRIV15 *Mar 17 10:08:33.265: %DMI-3-CLI_GEN_FAIL: R0/0: nesd: Failed to generate CLI change set internal error (18): internal error. *Mar 17 10:08:33.267: %DMI-5-CONFIG_I: R0/0: nesd: Configured from NETCONF/RESTCONF by cisco, transaction-id 365
Notice the error marked DMI-3-CLI_GEN_FAIL. It states “Failed to generate CLI change set internal error (18): internal error.” I was unable to find information about such an error online, but it seems to indicate that there is an error as far as the IOS is concerned.
Specifically, we were using the following IOS version:
Note that the “Status: 204 No Content” is not actually a problem, as many commands don’t actually result in a response that contains content. 204 states that the command was sent successfully, but the device doesn’t necessarily send a response back, and in many cases this is normal behaviour. You need to go into the device to verify your changes.
I hope this has been helpful!