File tree 1 file changed +5
-1
lines changed
client/src/test/java/org/asynchttpclient
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 18
18
import static org .asynchttpclient .Dsl .*;
19
19
import static org .asynchttpclient .test .TestUtils .*;
20
20
import static org .testng .Assert .*;
21
+ import io .netty .handler .codec .http .HttpHeaders ;
21
22
22
23
import java .io .IOException ;
23
24
import java .util .concurrent .Future ;
@@ -61,7 +62,10 @@ public AbstractHandler configureHandler() throws Exception {
61
62
@ Test (groups = "standalone" )
62
63
public void Expect100Continue () throws Exception {
63
64
try (AsyncHttpClient client = asyncHttpClient ()) {
64
- Future <Response > f = client .preparePut ("http://localhost:" + port1 + "/" ).setHeader ("Expect" , "100-continue" ).setBody (SIMPLE_TEXT_FILE ).execute ();
65
+ Future <Response > f = client .preparePut ("http://localhost:" + port1 + "/" )//
66
+ .setHeader (HttpHeaders .Names .EXPECT , HttpHeaders .Values .CONTINUE )//
67
+ .setBody (SIMPLE_TEXT_FILE )//
68
+ .execute ();
65
69
Response resp = f .get ();
66
70
assertNotNull (resp );
67
71
assertEquals (resp .getStatusCode (), HttpServletResponse .SC_OK );
You can’t perform that action at this time.
0 commit comments