Created
          October 3, 2018 21:16 
        
      - 
      
 - 
        
Save ionicpanda/e9ee6b5d4b1d4f148c40abc677427018 to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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