Compare commits
No commits in common. "0a8d4e47ac7abb99c8cae9da51d5861d175e0a29" and "3c501d9cdb6dc31635a740e19dc1787d0a972d5b" have entirely different histories.
0a8d4e47ac
...
3c501d9cdb
1
.idea/misc.xml
generated
1
.idea/misc.xml
generated
@ -7,7 +7,6 @@
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="workspaceImportForciblyTurnedOn" value="true" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
|
@ -32,7 +32,11 @@ public class RestApiClient implements IRestAPI{
|
||||
|
||||
RestApiClient client1 = new RestApiClient();
|
||||
|
||||
client1.post("Gericht", "{\"name\" : \"Svens Beine\", \"69.69\", \"beschreibung\" : \"Muss net schmegge, muss wirge\"}");
|
||||
ElternAccount elternAccount = new ElternAccount("hiiiiiiii", "124", "pimmel@pimmel.com");
|
||||
|
||||
String json = client1.gson.toJson(elternAccount);
|
||||
|
||||
client1.put("Benutzer",6, json);
|
||||
|
||||
}
|
||||
|
||||
@ -83,9 +87,13 @@ public class RestApiClient implements IRestAPI{
|
||||
// Send the request and get the response
|
||||
HttpResponse<String> httpResponse = client.send(httpRequest, HttpResponse.BodyHandlers.ofString());
|
||||
|
||||
// Print the response status code and body
|
||||
System.out.println("Status Code: " + httpResponse.statusCode() + httpResponse.body());
|
||||
Kind[] test = gson.fromJson(httpResponse.body(), Kind[].class);
|
||||
|
||||
// Print the response status code and body
|
||||
System.out.println("Status Code: " + httpResponse.statusCode());
|
||||
for(Kind i : test){
|
||||
System.out.println(i.getVorname());
|
||||
}
|
||||
//System.out.println("Response Body: " + test);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
Loading…
x
Reference in New Issue
Block a user