Change post to put

This commit is contained in:
Mina Lee 2016-11-02 16:07:54 +09:00
parent 7eb352159a
commit f349dbf240
3 changed files with 7 additions and 7 deletions

View file

@ -979,7 +979,7 @@ If you work with Apache Zeppelin and find a need for an additional REST API, ple
<col width="200">
<tr>
<td>Description</td>
<td>This ```POST``` method clear all paragraph results from note of given id.
<td>This ```PUT``` method clear all paragraph results from note of given id.
</td>
</tr>
<tr>
@ -999,4 +999,4 @@ If you work with Apache Zeppelin and find a need for an additional REST API, ple
<td><pre>{"status": "OK"}</pre></td>
</tr>
</tr>
</table>
</table>

View file

@ -467,7 +467,7 @@ public class NotebookRestApi {
* @param noteId ID of Note
* @return JSON with status.ok
*/
@POST
@PUT
@Path("{noteId}/clear")
@ZeppelinApi
public Response clearAllParagraphOutput(@PathParam("noteId") String noteId)

View file

@ -191,10 +191,10 @@ public class NotebookRestApiTest extends AbstractTestRestApi {
p2.setReturn(result, new Throwable());
// clear paragraph result
PostMethod post = httpPost("/notebook/" + note.getId() + "/clear", "");
LOG.info("test clear paragraph output response\n" + post.getResponseBodyAsString());
assertThat(post, isAllowed());
post.releaseConnection();
PutMethod put = httpPut("/notebook/" + note.getId() + "/clear", "");
LOG.info("test clear paragraph output response\n" + put.getResponseBodyAsString());
assertThat(put, isAllowed());
put.releaseConnection();
// check if paragraph results are cleared
GetMethod get = httpGet("/notebook/" + note.getId() + "/paragraph/" + p1.getId());