How do I store the response body into String array?
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<String> response
= restTemplate.getForEntity("http://localhost:9100/metrics", String.class);
Here is my http response:
# HELP go_gc_duration_seconds A summary of the GC invocation durations.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 3.6951e-05
go_gc_duration_seconds{quantile="0.25"} 7.3898e-05
go_gc_duration_seconds{quantile="0.5"} 0.000106166
go_gc_duration_seconds{quantile="0.75"} 0.000113714
go_gc_duration_seconds{quantile="1"} 0.000744301
go_gc_duration_seconds_sum 0.001169959
I would like to store the above data in a String array so that I can remove the comments and process the data.
How do i convert the above response into a String array?