List of usage examples for org.springframework.http HttpMethod GET
HttpMethod GET
To view the source code for org.springframework.http HttpMethod GET.
Click Source Link
From source file:com.github.ibm.domino.client.DominoRestClient.java
public List<CalendarEvent> getEvents() { init("events"); ResponseEntity<CalendarEventsWrapper> response = restTemplate.exchange(getUri(), HttpMethod.GET, getHttpEntity(), CalendarEventsWrapper.class); CalendarEventsWrapper events = response.getBody(); return events.getEvents(); }
From source file:com.pepaproch.gtswsdlclient.impl.AddresCheckImpl.java
/** * * @param addrQuery {@link AddressQuery} * @return <tt> {@link AddressResponse}</tt> *//*from ww w . j ava2 s.co m*/ public AddressResponse checkAddres(AddressQuery addrQuery) { URI toUri = new AddrCheckQueryBuilderImpl(restContext.getBASE_URL() + ADDR_CHECK_PATH).buildQuery(addrQuery) .encode().toUri(); ResponseEntity<AddressResponse> response = restContext.getRestTemplate().exchange(toUri, HttpMethod.GET, null, AddressResponse.class); return response.getBody(); }
From source file:io.curly.advisor.OAuth2ResourceConfig.java
@Override public void configure(HttpSecurity http) throws Exception { http.anonymous().and().antMatcher("/reviews/**").authorizeRequests() .antMatchers(HttpMethod.GET, "/reviews/owned").authenticated() .antMatchers(HttpMethod.GET, "/reviews/owned/{review}").authenticated() .antMatchers(HttpMethod.GET, "/reviews/artifact/{artifact}").permitAll() .antMatchers(HttpMethod.GET, "/reviews/**").permitAll().anyRequest().authenticated(); }
From source file:io.curly.artifact.OAuth2ResourceConfig.java
@Override public void configure(HttpSecurity http) throws Exception { http.anonymous().and().antMatcher("/artifacts/**").authorizeRequests() .antMatchers(HttpMethod.GET, "/artifacts/owned").authenticated() .antMatchers(HttpMethod.GET, "/artifacts/**").permitAll().anyRequest().authenticated(); }
From source file:net.eusashead.hateoas.springhalbuilder.controller.RootController.java
@RequestMapping(method = RequestMethod.OPTIONS) public ResponseEntity<Void> options(OptionsResponseBuilder<Void> builder) { return builder.allow(HttpMethod.GET).build(); }
From source file:it.f2informatica.webapp.SecurityConfig.java
@Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests().antMatchers(HttpMethod.GET, "/login*").permitAll() .antMatchers(HttpMethod.GET, "/static/**").access("isAnonymous() or isAuthenticated()") .antMatchers(HttpMethod.GET, "/**").authenticated(); http.formLogin().loginPage("/login").loginProcessingUrl("/processLogin").usernameParameter("username") .passwordParameter("password").defaultSuccessUrl("/home", true).failureUrl("/login_failed"); }
From source file:io.spring.batch.EnrichmentProcessor.java
@CircuitBreaker @Override/*from w w w . j av a2 s . c om*/ public Foo process(Foo foo) throws Exception { ResponseEntity<String> responseEntity = this.restTemplate.exchange("http://rest-service/enrich", HttpMethod.GET, null, String.class); foo.setMessage(responseEntity.getBody()); return foo; }
From source file:org.trustedanalytics.routermetrics.gathering.adapters.gorouter.GorouterClient.java
@Override public CompletableFuture<ResponseEntity<GorouterMetrics>> getData(String host) { return toCompletableFuture(template.exchange(host + PATH, HttpMethod.GET, entity, GorouterMetrics.class)); }
From source file:com.opensearchserver.hadse.cluster.ClusterTest.java
@Test public void t01_get() { HttpHeaders headers = new HttpHeaders(); headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON)); RestTemplate template = new RestTemplate(); ResponseEntity<NodeItem[]> entity = template.exchange("http://localhost:8080/_cluster", HttpMethod.GET, null, NodeItem[].class); assertTrue(entity.getBody().length >= 1); assertEquals(HttpStatus.OK, entity.getStatusCode()); }
From source file:com.develcom.cliente.Cliente.java
public void buscarArchivo() throws FileNotFoundException, IOException { CodDecodArchivos cda = new CodDecodArchivos(); RestTemplate restTemplate = new RestTemplate(); HttpHeaders headers = new HttpHeaders(); // Bufer bufer = new Bufer(); byte[] buffer = null; ResponseEntity<byte[]> response; restTemplate.getMessageConverters().add(new ByteArrayHttpMessageConverter()); headers.setAccept(Arrays.asList(MediaType.ALL)); HttpEntity<String> entity = new HttpEntity<>(headers); response = restTemplate.exchange(/*from w w w .j ava 2 s . c om*/ "http://localhost:8080/ServicioDW4J/expediente/buscarFisicoDocumento/21593", HttpMethod.GET, entity, byte[].class); if (response.getStatusCode().equals(HttpStatus.OK)) { buffer = response.getBody(); FileOutputStream output = new FileOutputStream(new File("c:/documentos/archivo.cod")); IOUtils.write(response.getBody(), output); cda.decodificar("c:/documentos/archivo.cod", "c:/documentos/archivo.pdf"); } }