Skip to content

Instantly share code, notes, and snippets.

@ionicpanda
Created October 3, 2018 21:16
Show Gist options
  • Save ionicpanda/e9ee6b5d4b1d4f148c40abc677427018 to your computer and use it in GitHub Desktop.
Save ionicpanda/e9ee6b5d4b1d4f148c40abc677427018 to your computer and use it in GitHub Desktop.
package com.commercebank.serveranalyzer.BackEnd;
import com.commercebank.serveranalyzer.BackEnd.DataPieces.CertChainData;
import com.commercebank.serveranalyzer.BackEnd.ServerAnalyzerBackEnd;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import java.util.Map;
@Controller
public class AnalyzeController {
// @RequestMapping(value="/analyzeURL")
// public ModelAndView getURLInformation(@RequestParam String url) {
// ServerAnalyzerBackEnd backEnd = new ServerAnalyzerBackEnd(url);
// backEnd.fetchAll();
// return backEnd.start();
//
// //Format to add single datapiece for fetching
//// backEnd.addDataPieceToFetch(new CertChainData());
// }
@ResponseBody
@RequestMapping(value="/analyzeURL")
public Map<String, Object> getURLInformation(@RequestParam String url) {
ServerAnalyzerBackEnd backEnd = new ServerAnalyzerBackEnd(url);
backEnd.fetchAll();
return backEnd.createOutput();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment