(HttpVerbs verb, String path, Params params, String body, String bearerToken,
HTTPClient client)
| 84 | private @Getter HttpURLConnection connection; |
| 85 | |
| 86 | protected Request(HttpVerbs verb, String path, Params params, String body, String bearerToken, |
| 87 | HTTPClient client) { |
| 88 | Configuration config = client.getConfiguration(); |
| 89 | |
| 90 | this.verb = verb; |
| 91 | this.host = config.getHost(); |
| 92 | this.path = path; |
| 93 | this.params = params; |
| 94 | this.body = body; |
| 95 | this.bearerToken = bearerToken; |
| 96 | this.languageVersion = System.getProperty("java.version"); |
| 97 | this.clientVersion = Amadeus.VERSION; |
| 98 | this.appId = config.getCustomAppId(); |
| 99 | this.appVersion = config.getCustomAppVersion(); |
| 100 | this.port = config.getPort(); |
| 101 | this.ssl = config.isSsl(); |
| 102 | |
| 103 | determineScheme(); |
| 104 | prepareUrl(); |
| 105 | prepareHeaders(); |
| 106 | } |
| 107 | |
| 108 | // Builds a HttpURLConnection using all the data for this request. |
| 109 | protected void establishConnection() throws IOException { |
nothing calls this directly
no test coverage detected