File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
main/java/org/apache/zeppelin/rest
test/java/org/apache/zeppelin/rest Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ public Response exportNoteBook(@PathParam("id") String noteId) {
173173 * @return JSON with new note ID
174174 * @throws IOException
175175 */
176- @ PUT
176+ @ POST
177177 @ Path ("import" )
178178 public Response importNotebook (String req ) {
179179 GsonBuilder gsonBuilder = new GsonBuilder ();
Original file line number Diff line number Diff line change @@ -367,11 +367,11 @@ public void testImportNotebook() throws IOException {
367367 String sourceNoteID = note .getId ();
368368 // get note content as JSON
369369 String oldJson = getNoteContent (sourceNoteID );
370- // call notebook put
371- PutMethod importPut = httpPut ("/notebook/import/" , oldJson );
372- assertThat (importPut , isCreated ());
370+ // call notebook post
371+ PostMethod importPost = httpPost ("/notebook/import/" , oldJson );
372+ assertThat (importPost , isCreated ());
373373 resp =
374- gson .fromJson (importPut .getResponseBodyAsString (),
374+ gson .fromJson (importPost .getResponseBodyAsString (),
375375 new TypeToken <Map <String , Object >>() {}.getType ());
376376 String importId = (String ) resp .get ("body" );
377377
@@ -383,7 +383,7 @@ public void testImportNotebook() throws IOException {
383383 // cleanup
384384 ZeppelinServer .notebook .removeNote (note .getId ());
385385 ZeppelinServer .notebook .removeNote (newNote .getId ());
386- importPut .releaseConnection ();
386+ importPost .releaseConnection ();
387387 }
388388
389389 private String getNoteContent (String id ) throws IOException {
You can’t perform that action at this time.
0 commit comments