Esempio n. 1
0
 @Override
 public RequestFixture body(byte[] bytes, String contentType) {
   requestHeaders.add(HttpHeaderNames.CONTENT_TYPE, contentType);
   requestHeaders.add(HttpHeaderNames.CONTENT_LENGTH, bytes.length);
   requestBody.capacity(bytes.length).writeBytes(bytes);
   return this;
 }
Esempio n. 2
0
 @Override
 public RequestFixture header(CharSequence name, String value) {
   requestHeaders.add(name, value);
   return this;
 }