@Test public void testReadValueFromSpringCloudConfig() throws Exception { HttpRequest request = HttpRequest.GET("/spring-cloud/issues/1"); String body = client.toBlocking().retrieve(request); assertNotNull(body); assertThat(body, equalTo("test: issue # 1!")); } }
BlockingHttpClient blockingHttpClient = httpClient.toBlocking();
BlockingHttpClient blockingHttpClient = httpClient.toBlocking();
BlockingHttpClient blockingHttpClient = httpClient.toBlocking();
@Test @Ignore public void testMailSend() throws Exception { //String requestBody = "{\"cc\": [\"sergio.delamo@softamo.com\"],\"recipient\": \"sergio.delamo@softamo.com\", \"subject\": \"Interested in Pet\", \"replyTo\": \"sergio.delamo@softamo.com\", \"htmlBody\": \"Body html\", \"bcc\": [\"sergio.delamo@softamo.com\"]}"; String requestBody = "{\"recipient\": \"sergio.delamo@softamo.com\"}"; HttpResponse rsp = client.toBlocking().exchange(HttpRequest.POST("/v1/mail/send",requestBody)); assertEquals(200, rsp.getStatus().getCode()); } }