Could not get response. (Internal Server Error)

已回答

when i try to get response

@Test
public void post01(){
//set the url
String url = "https://restful-booker.herokuapp.com/booking";

//set the expected data
BookingDatesPojo bookingDatesPojo=new BookingDatesPojo("2018-01-01","2019-01-01");
BookingPojo expectedData = new BookingPojo("Jim","Brown",111,true,bookingDatesPojo, "Breakfast");
System.out.println("expectedData = " + expectedData);

//Send the request and get the response
Response response = given().contentType(ContentType.JSON).body(expectedData).when().post(url);
response.prettyPrint();

Why am I get "Internal Server Error" 

 

java version "11.0.15.1" 2022-04-22 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.15.1+2-LTS-10)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.15.1+2-LTS-10, mixed mode)

评论操作 固定链接
It may be a proxy server problem. Try changing the HTTP proxy settings in the IDE: https://www.jetbrains.com/help/idea/settings-http-proxy.html
1

请先登录再写评论。