API call "Abort job" does not work for me
Posted: Sun Dec 16, 2018 7:01 pm
Hi steinar,
while creating the webui, i was not able to figure out how the "Abort Job" API works, i always got strange "empty" answers
When setting this url for a valid, running job in the browser, i get a text presented: Invalid resource : "/api/json/v1/jobs/20181216-195117-270-5355A49682BE"
Here an example that should work when you run ffastrans on default port, it basically proves that using jsfiddle works (as you enable CORS thankfully):
Hit the "make request" link bottom right: https://jsfiddle.net/p5nryj72/
Here an example for the actual DELETE request that should abort a job. Sure you need to change the jobid in the botton left window but for me this does not succeed:
https://jsfiddle.net/643vLxs0/2/
To be honest, i am not 100% sure if i do anything wrong but i am confident that the error is reproduceable easily.
A sidenote, i am not very experienced with other http methods than GET and POST, usually it just works as expected. I personally dislike the use of different http methods, it overcomplicates things. Instead i just go with either url parameters or http header parameters and such.
Cheers,
emcodem
while creating the webui, i was not able to figure out how the "Abort Job" API works, i always got strange "empty" answers
When setting this url for a valid, running job in the browser, i get a text presented: Invalid resource : "/api/json/v1/jobs/20181216-195117-270-5355A49682BE"
Here an example that should work when you run ffastrans on default port, it basically proves that using jsfiddle works (as you enable CORS thankfully):
Hit the "make request" link bottom right: https://jsfiddle.net/p5nryj72/
Here an example for the actual DELETE request that should abort a job. Sure you need to change the jobid in the botton left window but for me this does not succeed:
https://jsfiddle.net/643vLxs0/2/
To be honest, i am not 100% sure if i do anything wrong but i am confident that the error is reproduceable easily.
A sidenote, i am not very experienced with other http methods than GET and POST, usually it just works as expected. I personally dislike the use of different http methods, it overcomplicates things. Instead i just go with either url parameters or http header parameters and such.
Cheers,
emcodem