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", "a8ea413753msh15f71679011b0bbp19bf3ejsn899c6392170a")
		.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://i-m-all-ears.p.rapidapi.com/?id="))
		.header("X-RapidAPI-Key", "a8ea413753msh15f71679011b0bbp19bf3ejsn899c6392170a")
		.header("X-RapidAPI-Host", "i-m-all-ears.p.rapidapi.com")
		.method("GET", HttpRequest.BodyPublishers.noBody())
		.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
{"count":16,"next":"https://fyp-api-ml.herokuapp.com/predict/?id=&page=2","previous":null,"results":[{"id":"4ad82ba3-9b39-4da9-ae1c-8393d58632e7","text":"how do you break an anxious attachment style to make sure of a healthy possible relationship, without being avoidant? i noticed i send the first texts a lot and care a little too much about when this guy texts me back and when he doesn’t have the time to , i spiral. i don’t confront him about it because i know he’s got a lot going on at the moment and know that it’s just me overthinking because we still do talk and have a lot in common. we just started talking the beginning of the month and i feel like we’re getting to know eachother and we hung out for the first time a couple days ago and it was great ! i just don’t wanna send too many messages or try to hard because i’m very scared to scare him away. how do i let him prepare and let everything slowly work it’s way up to a relationship without completely just not messaging him or interacting immediately?","prediction":"Type 3","score":"100.00%","diagnosis":"['Generalized Anxiety Disorder', 'Major Depressive Disorder', 'Hypomania', 'Adjustment Disorder', 'Suicidal Ideation Paranoid', 'Schizophrenia', 'Borderline Personality Disorder', 'Dissociative Disorder', 'Type-A Personality']","stressor":"['Work Stress', 'Companionship Issues', 'Public Expectation', 'Underlying Unresolved Health Issues', 'Hereditary Traits']","symptom":"['Anxiety', 'Helplessness', 'Emptiness', 'Loss of Motivation', 'Anhedonia (Loss of Passion)', 'Fatigue', 'Isolation', 'Suicidal Thoughts', 'Paranoia', 'Hearing Voices', 'Hallucination', 'Comptetitiveness']"},{"id":"76474528-5d72-4e59-96fe-bd0dd9b974bb","text":"I am depressed. Please don't scroll down.\r\nI'm 24 years old. I had a pretty normal life. My father passed away when I was in 4th standard. My mom is always there for me. She helped me a lot. Now, I'm way past the time to get a job. My mom is pressuring me. I have failed my college, I couldn't pass the failed subjects. All my friends are successful and I got left out, which is my fault. I failed because I took the physics to major and I'm not at all good in maths. Everyone says to finish it. I don't want to because I feel like a loser. Mom is forcing me to get a government job(I'm from India, it's a big thing here). Im trying to get a job, but nothing is working out. I always feel like I'm going to die. I don't think my mom will support me in getting therapy. I'm living with her. She says a job is necessary to get married. I'm horny and hungry when I am at home. Sometimes I get so sad, I feel like I don't exist at all. This is not a rant. Still living with mom and trying to pass an exam for government jobs.","prediction":"Type 2","score":"93.70%","diagnosis":"['Generalized Anxiety Disorder', 'Major Depressive Disorder', 'Hypomania', 'Adjustment Disorder', 'Bipolar Disorder']","stressor":"['Work Stress', 'Companionship Issues']","symptom":"['Anxiety', 'Helplessness', 'Emptiness', 'Loss of Motivation', 'Anhedonia (Loss of Passion)', 'Fatigue', 'Isolation', 'Attachment Issues']"},{"id":"f047eb4a-7a85-42de-8a32-737df409de7a","text":"How I Tricked Myself Into Taking Care of Myself\r\nBasically, I tricked myself into taking care of myself by taking care of other things. In undergrad I had a betta fish, and now in my apartment I have houseplants. And I mean I have over 40 of them. When I get super depressed, the first things to go are personal hygiene and eating, and it takes me about an hour to decide if I want to get out of bed or not, and if I even can. But! Can't stay in bed because I don't want my plants to die! Couldn't stay in bed because I had to get up and clean my fish tank and feed her! And once I'm out of bed, I guess I can make myself brush my teeth and try to eat something small. Maybe I can make a coffee and I can go out and sit on my balcony for a while. Maybe I can even shower and clean a little.\r\n\r\nI'm not saying this will work for everyone, but it's been a pretty decent help for me :)","prediction":"Type 2","score":"99.79%","diagnosis":"['Generalized Anxiety Disorder', 'Major Depressive Disorder', 'Hypomania', 'Adjustment Disorder', 'Bipolar Disorder']","stressor":"['Work Stress', 'Companionship Issues']","symptom":"['Anxiety', 'Helplessness', 'Emptiness', 'Loss of Motivation', 'Anhedonia (Loss of Passion)', 'Fatigue', 'Isolation', 'Attachment Issues']"}]}