This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Server configuration. | |
| server: | |
| applicationConnectors: | |
| - type: http | |
| port: 8085 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| keytool -genkeypair | |
| -keyalg RSA | |
| -dname "CN=localhost" | |
| -keystore dwstart.keystore | |
| -keypass crimson | |
| -storepass crimson |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Server configuration. | |
| server: | |
| applicationConnectors: | |
| - type: http | |
| port: 8080 | |
| - type: https | |
| port: 8443 | |
| keyStorePath: dwstart.keystore | |
| keyStorePassword: crimson | |
| validateCerts: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class IntegrationTest { | |
| @ClassRule | |
| public static final DropwizardAppRule<DWGettingStartedConfiguration> RULE | |
| = new DropwizardAppRule<>(DWGettingStartedApplication.class, | |
| "config.yml"); | |
| @Test | |
| public void testGetGreeting() { | |
| String expected = "Hello world!"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Create SSL Configurator | |
| SslConfigurator sslConfigurator = SslConfigurator.newInstance(); | |
| //Register a keystore | |
| sslConfigurator.trustStoreFile("dwstart.keystore") | |
| .trustStorePassword("crimson"); | |
| //Create SSL Context | |
| SSLContext sSLContext = sslConfigurator.createSSLContext(); | |
| //Obtain client | |
| Client client = ClientBuilder | |
| .newBuilder() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Title":"RESTful Web APIs", | |
| "Price":"$31.92", | |
| "Paperback":"408 pages", | |
| "Language":"English" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "_links":{ | |
| "self":{ | |
| "href":"/book/123" | |
| } | |
| }, | |
| "Title":"RESTful Web APIs", | |
| "Price":"$31.92", | |
| "Paperback":"408 pages", | |
| "Language":"English" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "_links":{ | |
| "self":{ | |
| "href":"/book/123" | |
| }, | |
| "http://booklistapi.com/rels/authors":[ | |
| { | |
| "href":"/author/4554", | |
| "title":"Leonard Richardson" | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "_links":{ | |
| "self":{ | |
| "href":"/book/123" | |
| }, | |
| "curries":[ | |
| { | |
| "name":"ns", | |
| "href":"http://booklistapi.com/rels/{rel}", | |
| "templated":true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "_links":{ | |
| "self":{ | |
| "href":"/author/4554" | |
| }, | |
| "curries":[ | |
| { | |
| "name":"ns", | |
| "href":"http://booklistapi.com/rels/{rel}", | |
| "templated":true |