File tree 1 file changed +17
-1
lines changed
client/src/test/java/org/asynchttpclient 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ private static String getTargetUrl() {
58
58
}
59
59
60
60
@ Test
61
- public void postBodyOverHttps () throws Throwable {
61
+ public void postFileOverHttps () throws Throwable {
62
62
logger .debug (">>> postBodyOverHttps" );
63
63
withClient (config ().setSslEngineFactory (createSslEngineFactory ())).run (client -> {
64
64
withServer (server ).run (server -> {
@@ -72,6 +72,22 @@ public void postBodyOverHttps() throws Throwable {
72
72
});
73
73
logger .debug ("<<< postBodyOverHttps" );
74
74
}
75
+
76
+ @ Test
77
+ public void postLargeFileOverHttps () throws Throwable {
78
+ logger .debug (">>> postLargeFileOverHttps" );
79
+ withClient (config ().setSslEngineFactory (createSslEngineFactory ())).run (client -> {
80
+ withServer (server ).run (server -> {
81
+ server .enqueueEcho ();
82
+
83
+ Response resp = client .preparePost (getTargetUrl ()).setBody (LARGE_IMAGE_FILE ).setHeader (CONTENT_TYPE , "image/png" ).execute ().get ();
84
+ assertNotNull (resp );
85
+ assertEquals (resp .getStatusCode (), HttpServletResponse .SC_OK );
86
+ assertEquals (resp .getResponseBodyAsBytes ().length , LARGE_IMAGE_FILE .length ());
87
+ });
88
+ });
89
+ logger .debug ("<<< postLargeFileOverHttps" );
90
+ }
75
91
76
92
@ Test
77
93
public void multipleSequentialPostRequestsOverHttps () throws Throwable {
You can’t perform that action at this time.
0 commit comments