Commit ca48c433 authored by gspbirel56's avatar gspbirel56
Browse files

I added in some constuctive comments

parent 1d53d4e5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -88,14 +88,14 @@ public class MLRestController {

    @PostMapping(value = "/restCreateDoc")
    public @ResponseBody
    String restCreateDoc(@RequestParam("files") MultipartFile[] uploadfiles) {
    String restCreateDoc(@RequestParam("files") MultipartFile[] uploadfiles) { // WHY DOES THIS TAKE IN AN ARRAY??????
        try {
            CredentialsProvider provider = new BasicCredentialsProvider();
            Credentials credentials = new UsernamePasswordCredentials("admin", "admin");  // provide username & password
            provider.setCredentials(AuthScope.ANY, credentials);
            HttpClient httpClient = HttpClientBuilder.create().setDefaultCredentialsProvider(provider).build();

            String uri = "";           // provide the REST API URI
            String uri = "http://192.168.56.200:8000/LATEST/documents?uri=/final-project/" /* + the name of the file we're trying to upload goes here */;           // provide the REST API URI

            HttpPut put = new HttpPut(uri);