1

I have a rest Api like below.

@POST
@Path("/importFile")
@Consumes("application/zip")
@ApiOperation(value = "Importing File")
public List<String> importFile(InputStream is) throws IOException {
    ZipInputStream zipInputStream = new ZipInputStream(is);
    return importFile(zipInputStream);
}

How can I test it ?

shruti1810
  • 3,920
  • 2
  • 16
  • 28
robin
  • 1,893
  • 1
  • 18
  • 38

1 Answers1

1

You can use a curl tool -

curl -v -F file=@file1.txt -F http://testYouFile/endpoint

You can also use chrome add-ons like postman or https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo

Paul John
  • 1,626
  • 1
  • 13
  • 15