Scanner input = new Scanner(System.in);
System.out.print("input a location to see the weather: ");
String translation = input.nextLine();
System.out.println("output:" + translation);
input a location to see the weather: output:san diego
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

HttpRequest request = HttpRequest.newBuilder()
		.uri(URI.create("https://mental-health-info-api.p.rapidapi.com/news/thetimes"))
		.header("X-RapidAPI-Key", "8d571b2f72msh44f8fd48e083624p19cce1jsnfb1e373c1716")
		.header("X-RapidAPI-Host", "mental-health-info-api.p.rapidapi.com")
		.method("GET", HttpRequest.BodyPublishers.noBody())
		.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
[{"title":"UK NEWSFormer soldier’s coastal run raises £400,000 for mental health charityAfter surviving two bomb blasts in Iraq and Afghanistan, Paul Minter could be forgiven for wanting a quiet life. ...Tuesday October 04 2022, 5.00pm, The TimesKieran Gair","url":"https://www.thetimes.co.uk/article/former-soldiers-coastal-run-raises-400-000-for-mental-health-charity-rx6r5p22r","source":"thetimes"},{"title":"GILLIAN BOWDITCHSuicidal children are being failed. The system is brokenA quarter of children referred for specialist help with mental health problems have either tried or thought about...Sunday September 04 2022, 12.01am, The Sunday TimesGillian Bowditch","url":"https://www.thetimes.co.uk/article/suicidal-children-failed-broken-system-scotland-comment-xgtdp0h2b","source":"thetimes"},{"title":"HEALTHParents go private to get children mental health helpParents are increasingly turning to private health services for support with their children’s mental health...Monday August 08 2022, 12.01am, The TimesKat Lay, Health Editor","url":"https://www.thetimes.co.uk/article/parents-go-private-to-get-children-mental-health-help-72fn9w53n","source":"thetimes"},{"title":"HEALTHChild mental health crisis ‘holds nation back’The mental health emergency among children is so profound that it threatens the country’s future prosperity, a...Saturday July 30 2022, 12.01am, The TimesJames Beal, Social Affairs Editor","url":"https://www.thetimes.co.uk/article/child-mental-health-crisis-is-holding-england-back-5s8qpzclj","source":"thetimes"},{"title":"Children attempt suicide as they wait for NHS helpThousands of children and young adults have attempted suicide as a result of long waits for NHS mental health care...Thursday July 21 2022, 12.01am, The TimesKat Lay, Health Editor","url":"https://www.thetimes.co.uk/article/children-attempt-suicide-as-they-wait-for-nhs-help-bgnhslbzc","source":"thetimes"},{"title":"Video IconHEALTHCost of living risks ‘pandemic-style mental health crisis’The cost of living crisis poses a pandemic-level threat to the nation’s mental wellbeing, one of Britain’s most...Monday June 20 2022, 2.45pm, The TimesKat Lay, Health Editor","url":"https://www.thetimes.co.uk/article/cost-of-living-risks-pandemic-style-mental-health-crisis-lwwcxzlvb","source":"thetimes"},{"title":"HEALTHMental illness among young at record highA record number of children and young people are being treated for mental health problems. More than 420,000 were...Monday May 23 2022, 12.01am, The TimesCharlie Moloney","url":"https://www.thetimes.co.uk/article/mental-illness-in-children-and-young-people-at-record-high-pz7qn3r2b","source":"thetimes"},{"title":"UK NEWSBecker ‘mentally strong and doing OK’ in jailBoris Becker is doing “OK” in prison and his mental health is good, but life inside Wandsworth jail is “not a...Wednesday May 04 2022, 9.30am, The TimesKieran Gair","url":"https://www.thetimes.co.uk/article/boris-becker-mentally-strong-and-doing-ok-in-jail-says-wife-s68p2l386","source":"thetimes"}]
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

HttpRequest request = HttpRequest.newBuilder()
		.uri(URI.create("https://personality-traits.p.rapidapi.com/personality"))
		.header("content-type", "application/json")
		.header("Accept", "application/json")
		.header("X-RapidAPI-Key", "8d571b2f72msh44f8fd48e083624p19cce1jsnfb1e373c1716")
		.header("X-RapidAPI-Host", "personality-traits.p.rapidapi.com")
		.method("POST", HttpRequest.BodyPublishers.ofString("[\r\n    {\r\n        \"id\": \"1\",\r\n        \"language\": \"en\",\r\n        \"text\": \"   \"\r\n    }\r\n]"))
		.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
[{"id":"1","predictions":[{"prediction":"emotional","probability":0.93342}]}]