Пример #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;
 }
Пример #2
0
 @Override
 public RequestFixture header(CharSequence name, String value) {
   requestHeaders.add(name, value);
   return this;
 }