$command_output = @'
Speedtest by Ookla
Server: text
ISP: text.
Latency: 1.64 ms (0.07 ms jitter)
Download: 25.20 Mbps (data used: 61.6 MB )
Upload: 36.61 Mbps (data used: 46.8 MB )
Packet Loss: Not available.
Result URL: https://www.speedtest.net/result/c/f4dba237
'@ -split "`n"
write-output $command_output | Select-String 'Download';
Download: 25.20 Mbps (data used: 61.6 MB )
FROM tomcat:8.5.27-jre8-alpine
ENV CATALINA_HOME="/usr/local/tomcat"
ARG CATALINA_HOME=${CATALINA_HOME}
RUN mkdir ${CATALINA_HOME}/webapps/manual
ADD "src/main/webapp/index.html" ${CATALINA_HOME}/webapps/manual
# will create a app 'manual'
EXPOSE 8080
ENTRYPOINT ${CATALINA_HOME}/bin/catalina.sh run
org.springframework.web.client.RestTemplate
@ResponseBody
@PostMapping(value = "/page" , produces = MediaType.TEXT_PLAIN_VALUE)
public ResponseEntity<String> page(@RequestParam String name) {
// callanother server / port on same host
final String url = String.format("http://localhost:%d/basic/post", port);
RestTemplate restTemplate = new RestTemplate();
final HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
final Data input = new Data();
input.setName(name);
final Gson gson = new Gson();
final String payload = gson.toJson(input);
final HttpEntity<String> request = new HttpEntity<String>(payload, headers);
final ResponseEntity<Data> responseEntity = restTemplate.postForEntity(url,
request, Data.class, headers);
final String result = responseEntity.getBody().getName();
return ResponseEntity.status(HttpStatus.OK).body(result);
}
AssemblyInfo.cs
app.config
а также файлы билда - справитесь ?