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:com.baidu.stqa.signet.web.action.OdwAction.java
/** * ?//from ww w .j a v a 2 s . c om * * @return */ @RequestMapping(value = "/odw", method = RequestMethod.GET) @ResponseBody public ResponseEntity<Map<String, Long>> check() { Map<String, Long> map = new HashMap<String, Long>(); map.put("status", 0L); return new ResponseEntity<Map<String, Long>>(map, HttpStatus.OK); }
From source file:gt.dakaik.rest.impl.UserProfileImpl.java
@Override public ResponseEntity<UserProfile> findById(int idUsuario, String token, Long id) throws EntidadNoEncontradaException { UserProfile p = repoUserProfile.findOne(id); if (p != null) { return new ResponseEntity(p, HttpStatus.OK); } else {// ww w . j ava2 s.co m throw new EntidadNoEncontradaException("Entity User Profile"); } }
From source file:org.openbaton.nfvo.api.RestVNFManager.java
@RequestMapping(method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) public Iterable<VnfmManagerEndpoint> findAll() { return vnfManagerManagement.query(); }
From source file:org.jtwig.acceptance.CheckTestingFrameworkTest.java
@RequestMapping("/") public ResponseEntity<String> ok() { return new ResponseEntity<>("ok", HttpStatus.OK); }
From source file:org.openbaton.nfvo.api.RestVNFComponent.java
@RequestMapping(method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) public Iterable<VNFComponent> findAll() { return vnfComponentManagment.query(); }
From source file:com.ar.dev.tierra.api.controller.ChartController.java
@RequestMapping(value = "/vendedor/cantidad", method = RequestMethod.GET) public ResponseEntity<?> getRowCountVendedor(@RequestParam("idVendedor") int idVendedor) { List<Chart> chart = impl.getVentaVendedores(idVendedor); if (!chart.isEmpty()) { return new ResponseEntity<>(chart, HttpStatus.OK); } else {/*from w w w . j a v a2 s . com*/ return new ResponseEntity<>(HttpStatus.NOT_FOUND); } }
From source file:com.neu.controller.APIController.java
@RequestMapping(value = "/apicall.htm", method = RequestMethod.POST, headers = "Accept=*/*", produces = "application/json") @ResponseStatus(HttpStatus.OK) public @ResponseBody String searchresult(HttpServletRequest request) throws Exception { Map pmap = request.getParameterMap(); System.out.println("in drugsearch controller"); String action = request.getParameter("action"); String urlRestWebService = "https://ussouthcentral.services.azureml.net/workspaces/168eb4a3d72e4b078160213fcdaa4333/services/ee080088b48141e0af10c9913067689d/execute?api-version=2.0&details=true"; HttpHeaders headers = new HttpHeaders(); headers.add("Authorization", "Bearer AJacooh+WG4WeJTntLNn/E3A3E4yQELYY8S6/2sbpcsBvNFSCabuopvuiqlnrd47a0qBf4Coj1LMcEhBUm0Ujw=="); headers.add("Content-Length", "100000"); headers.add("Content-Type", "application/json"); String requestJson = "{'Inputs': {'input1': {'ColumnNames': [ 'drugname','route','dose_amt','dose_unit','dose_form', 'dose_freq','mfr_sndr','pt'],'Values':[['" + pmap.get("drugname") + "','" + pmap.get("reactionlist") + "','" + pmap.get("doseform") + "','" + pmap.get("doseunit") + "','" + pmap.get("dosefreq") + "','" + pmap.get("mfndetails") + "','" + pmap.get("route") + "','" + pmap.get("doseamt") + "']]}},'GlobalParameters': {}}"; HttpEntity<String> entity = new HttpEntity<String>(requestJson, headers); System.out.println("entity" + entity); RestTemplate restTemplate = new RestTemplate(); String restData = restTemplate.postForObject(urlRestWebService, entity, String.class); ObjectMapper mapper = new ObjectMapper(); mapper.enable(SerializationConfig.Feature.INDENT_OUTPUT); mapper.writeValue(System.out, restData); // Drugs drug=new Drugs("AZ","sn"); return mapper.writeValueAsString(restData); }
From source file:ar.com.zauber.commons.social.oauth.examples.web.controllers.IndexController.java
/** * @throws IOException/*from www.j ava2 s . c o m*/ */ @RequestMapping(method = RequestMethod.GET) @ResponseStatus(value = HttpStatus.OK) public final ModelAndView getIndex() throws IOException { ModelAndView out = new ModelAndView("index"); return out; }
From source file:com.folion.api.rest.controller.HomePageRestController.java
@RequestMapping(value = "/test/test", method = RequestMethod.GET) public ResponseEntity<Feature> getFeature() { Feature feature = new Feature(); feature.setId(UUID.randomUUID().toString()); return new ResponseEntity<>(feature, HttpStatus.OK); }
From source file:com.baidu.terminator.manager.action.LogAction.java
@RequestMapping(value = "/{linkId}/{offset}", method = RequestMethod.GET) public ResponseEntity<Log> getLog(@PathVariable int linkId, @PathVariable long offset) throws IOException { Log log = logService.readLog(linkId, offset); return new ResponseEntity<Log>(log, HttpStatus.OK); }