MXS-1300: Correct clear entry point documentation

Corrected the clear entry point documentation by changing the method from
POST to PUT. Fixed MaxCtrl to use the correct methods for set/clear.
This commit is contained in:
Markus Mäkelä 2017-07-06 14:30:29 +03:00
parent 252022534c
commit f4dacff27c
3 changed files with 3 additions and 3 deletions

View File

@ -552,7 +552,7 @@ Status: 403 Forbidden
### Clear server state
```
POST /v1/servers/:name/clear
PUT /v1/servers/:name/clear
```
The _:name_ in the URI must map to a server name with all whitespace replaced

View File

@ -19,7 +19,7 @@ exports.builder = function(yargs) {
yargs
.command('server <server> <state>', 'Clear server state', {}, function(argv) {
var target = 'servers/' + argv.server + '/clear?state=' + argv.state
doRequest(target, null, {method: 'POST'})
doRequest(target, null, {method: 'PUT'})
})
.usage('Usage: clear <command>')
.help()

View File

@ -19,7 +19,7 @@ exports.builder = function(yargs) {
yargs
.command('server <server> <state>', 'Set server state', {}, function(argv) {
var target = 'servers/' + argv.server + '/set?state=' + argv.state
doRequest(target, null, {method: 'POST'})
doRequest(target, null, {method: 'PUT'})
})
.usage('Usage: set <command>')
.help()