Package com.karafra.bitchutedl.web
Class HomeController
- java.lang.Object
-
- com.karafra.bitchutedl.web.HomeController
-
@RestController @RequestMapping("/") public class HomeController extends Object
-
-
Constructor Summary
Constructors Constructor Description HomeController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.web.servlet.ModelAndViewdownload(IndexPageForm form)Page containing information about download.voiddownload(javax.servlet.http.HttpServletResponse response)Endpoint that redirects to index page if wrong method is sent to /download endpoint.org.springframework.web.servlet.ModelAndViewindex()Page you see when you open website.
-
-
-
Method Detail
-
index
@GetMapping public org.springframework.web.servlet.ModelAndView index()
Page you see when you open website.- Returns:
- index page
- Since:
- 1.0
-
download
@PostMapping("/download") public org.springframework.web.servlet.ModelAndView download(@ModelAttribute IndexPageForm form)Page containing information about download.- Parameters:
form- form passed from index page.- Returns:
- page containing information about download.
- Since:
- 1.0
-
download
@GetMapping("/download") public void download(javax.servlet.http.HttpServletResponse response) throws IOExceptionEndpoint that redirects to index page if wrong method is sent to /download endpoint. Needs to enhanced.- Parameters:
response- response to redirect.- Throws:
IOException- when redirect dows not exits- Since:
- 1.0
-
-