Example usage for org.springframework.http HttpStatus OK

List of usage examples for org.springframework.http HttpStatus OK

Introduction

In this page you can find the example usage for org.springframework.http HttpStatus OK.

Prototype

HttpStatus OK

To view the source code for org.springframework.http HttpStatus OK.

Click Source Link

Document

200 OK .

Usage

From source file:fi.hsl.parkandride.itest.CacheHeadersTest.java

@Test
public void api_urls_are_not_cached__deep() {
    long facilityId = dummies.createFacility();

    when().get("api/v1/facilities/" + facilityId).then().statusCode(HttpStatus.OK.value())
            .header("Cache-Control", "no-cache");
}

From source file:unitTestTutorials.BlogEntryController.java

@ResponseStatus(HttpStatus.OK)
@RequestMapping(method = RequestMethod.GET)
public @ResponseBody BlogEntry getTest() {
    BlogEntry blogEntry = new BlogEntry();

    blogEntry.setTitle("Test Blog Entry");
    return blogEntry;
}

From source file:hr.softwarecity.osijek.controllers.SessionController.java

/**
 * Method to send HTTP ok if session is present
 * @return HTTP 200//from   w w w  . j a  va2  s  .c o  m
 */
@RequestMapping(value = "/goodrequest")
public ResponseEntity returnOk() {
    return new ResponseEntity(HttpStatus.OK);
}

From source file:cloud.simple.web.UserController.java

@RequestMapping(value = "/users")
public ResponseEntity<List<User>> readUserInfo() {
    List<User> users = userService.readUserInfo();
    return new ResponseEntity<List<User>>(users, HttpStatus.OK);
}

From source file:org.echocat.marquardt.example.ExampleServiceController.java

@RequestMapping(value = "/someUnprotectedResource", method = RequestMethod.POST)
@ResponseStatus(HttpStatus.OK)
public void someUnprotectedResource() throws IOException {
    LOGGER.info("/exampleservice/someUnprotectedResource received a request");
}

From source file:com.xinferin.controller.LicencesController.java

@RequestMapping(value = "/{licenceId}", method = RequestMethod.GET)
@ResponseStatus(HttpStatus.OK)
public String checkRevoke(@PathVariable int licenceId) {
    return daoLicence.checkRevoke(licenceId);
}

From source file:com.diagrama.repository.EncuestControl.java

@RequestMapping(value = "/taller/{idproducto}", method = RequestMethod.GET)
public ResponseEntity<?> getEncuesta(@PathVariable int idproducto) {
    Iterable<Producto> producto = er.findAll();
    return new ResponseEntity<>(producto, HttpStatus.OK);
}

From source file:br.com.oauth.resources.HomeRestController.java

@RequestMapping(method = RequestMethod.GET)
public ResponseEntity<Resposta<String>> getHome() {
    Resposta<String> resposta = RespostaBuilder.getBuilder().setResultado("Est  a home e voc esta logado")
            .build();/*  w ww  .  jav  a2 s  . c om*/
    return new ResponseEntity<>(resposta, HttpStatus.OK);
}

From source file:com.xinferin.controller.CustomerController.java

@RequestMapping(value = "/{customerId}", method = RequestMethod.PUT, consumes = "application/json")
@ResponseStatus(HttpStatus.OK)
public void editCustomer(@PathVariable int customerId, @RequestBody Customer customer) {
    customer.setId(customerId);//ww w . j a v  a2s.  c  om
    daoCustomer.edit(customer);
}

From source file:io.syndesis.runtime.FilterITCase.java

@Test
public void shouldGetGlobalFilterOptions() {
    ResponseEntity<FilterOptions> response = get("/api/v1/integrations/filters/options", FilterOptions.class,
            tokenRule.validToken(), HttpStatus.OK);
    FilterOptions filterOptions = response.getBody();
    Assert.assertNotNull(filterOptions);
}