Imrpoved image handling since the size of the image is about 5MB.

This commit is contained in:
verboomp
2026-02-02 10:35:22 +01:00
parent 33ee33d55c
commit 8d329501e4
15 changed files with 235 additions and 46 deletions

View File

@@ -117,13 +117,40 @@ public class CustomerPictureResourceTest extends AbstractRestTest {
assertEquals(401, code);
}
*/
@Test
@Order(2)
public void doTest() throws IOException {
LOG.info("doAddCustomerPicture");
//String authorization = getBasicHeader();
//LOG.info("authorization: " + authorization);
String path = deploymentURL + PATH;
Request request = Request.Options(path).addHeader("Accept", "application/json; charset=utf-8");
//.addHeader("Authorization", authorization)
//.bodyFile(new File(BASE_UPLOAD + "add.json"), ContentType.APPLICATION_JSON);
HttpResponse httpResponse = executeRequest(request);
var headers = httpResponse.getAllHeaders();
for (var header : headers) {
System.out.println(header.getName() + " " + header.getValue());
}
int code = httpResponse.getStatusLine().getStatusCode();
assertEquals(200, code);
}
public static void main(String[] args) throws IOException {
var test = new CustomerPictureResourceTest();
test.deploymentURL = "http://localhost:8080/";
test.deploymentURL = "https://hartmann-cue.heydevelop.de/";
test.username = "adm";
test.password = "x1t0e7Pb49";
test.doAddCustomerWithPicture();
test.doTest();
}
}