List of usage examples for org.springframework.http HttpStatus OK
HttpStatus OK
To view the source code for org.springframework.http HttpStatus OK.
Click Source Link
From source file:org.openbaton.nfvo.api.RestVNFManager.java
@RequestMapping(value = "{id}", method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) public VnfmManagerEndpoint findById(@PathVariable("id") String id) { return vnfManagerManagement.query(id); }
From source file:com.nazara.proxy.api.Endpoint.java
@RequestMapping(path = "/status", method = RequestMethod.GET) @ResponseBody//from w ww . j a v a 2 s .c om public ResponseEntity<Object> proxyRequest(@RequestParam(value = "msisdn", required = false) String msisdn) { logger.info("status request arrived"); try { HttpResponse<IPInfo> ipInfoResponse = Unirest.get("http://ipinfo.io/") .header("accept", "application/json").asObject(IPInfo.class); if (ipInfoResponse.getStatus() == 200) { return new ResponseEntity<Object>(ipInfoResponse.getBody(), HttpStatus.OK); } } catch (Exception exception) { logger.error("Error while processing proxy request {}", exception); return new ResponseEntity<Object>("NOK|ERR_CODE", HttpStatus.INTERNAL_SERVER_ERROR); } return new ResponseEntity<Object>("NOK|ERR_CODE", HttpStatus.NO_CONTENT); }
From source file:org.openbaton.nfvo.api.RestVNFComponent.java
@RequestMapping(value = "{id}", method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) public VNFComponent findById(@PathVariable("id") String id) { return vnfComponentManagment.query(id); }
From source file:com.epam.reportportal.extension.bugtracking.jira.oauth.OAuthController.java
@RequestMapping(value = "/approve", method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) @ApiOperation("Get registered external system instance") public void callback(HttpServletRequest rq) throws IOException { System.out.println(rq);//www . j av a 2s . c o m rq.getParameterMap().forEach((k, v) -> System.out.println(k + ":" + v[0])); }
From source file:net.paulgray.lmsrest.grades.GradesController.java
@RequestMapping(value = GradesController.PATH, method = RequestMethod.GET, produces = "application/json") public ResponseEntity getAnnouncements(@ContextUser User user, @RequestParam(value = "courseFilter", defaultValue = "") String courseFilter) { return new ResponseEntity(gradesService.getGradesForUser(user, courseFilter), HttpStatus.OK); }
From source file:org.cloudfoundry.identity.uaa.integration.LoginInfoEndpointIntegrationTests.java
/** * tests a happy-day flow of the <code>/info</code> endpoint *//* w ww .j ava 2 s . c o m*/ @Test public void testHappyDay() throws Exception { @SuppressWarnings("rawtypes") ResponseEntity<Map> response = serverRunning.getForObject("/info", Map.class); assertEquals(HttpStatus.OK, response.getStatusCode()); @SuppressWarnings("unchecked") List<Map<String, String[]>> prompts = (List<Map<String, String[]>>) response.getBody().get("prompts"); assertNotNull(prompts); }
From source file:com.diagrama.repository.PeriodoController.java
@RequestMapping(value = "/periodo", method = RequestMethod.GET) public ResponseEntity<?> ConsultarPeriodo() { Iterable<PeriodosLectivos> periodosLectivos = periodoRepository.findAll(); return new ResponseEntity<>(periodosLectivos, HttpStatus.OK); }
From source file:com.mycompany.messaging.SnsController.java
@RequestMapping(value = "/send", method = RequestMethod.POST) @ResponseStatus(HttpStatus.OK) public void sendNotification(@RequestBody SnsNotification notification) { LOG.debug("Going to send notification {}", notification); this.notificationMessagingTemplate.sendNotification("SnsTopic", notification.getMessage(), notification.getSubject());// w ww.ja v a 2 s . c o m }
From source file:io.springagora.store.rest.controllers.CategoryRestController.java
@RequestMapping(method = RequestMethod.GET) @ResponseStatus(value = HttpStatus.OK) public List<Category> listAllCategories() { List<Category> categories = Category.findAll(); if (categories != null && categories.size() > 0) { return categories; }//www . j a v a 2 s . c om throw new EntityNotFoundException("Sorry, no categories found."); }
From source file:gt.dakaik.rest.impl.StateImpl.java
@Override public ResponseEntity<State> findAll(int idUsuario, String token) throws EntidadNoEncontradaException { return new ResponseEntity(repoState.findAll(), HttpStatus.OK); }