Examples of writeRequest()


Examples of com.eviware.soapui.impl.wsdl.submit.transports.http.support.attachments.MimeMessageMockResponseEntity.writeRequest()

      MimeMessageMockResponseEntity mimeMessageRequestEntity = new MimeMessageMockResponseEntity( message, isXOP,
          this );

      response.addHeader( "Content-Type", mimeMessageRequestEntity.getContentType() );
      response.addHeader( "MIME-Version", "1.0" );
      mimeMessageRequestEntity.writeRequest( outData );
    }

    if( outData.size() > 0 )
    {
      byte[] data = outData.toByteArray();
View Full Code Here

Examples of com.ning.http.multipart.MultipartRequestEntity.writeRequest()

        }

        MultipartRequestEntity requestEntity = new MultipartRequestEntity(parts.toArray(new Part[]{}), null);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try {
            requestEntity.writeRequest(baos);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        InputStream body = new ByteArrayInputStream(baos.toByteArray());
        String contentType = requestEntity.getContentType();
View Full Code Here

Examples of com.ning.http.multipart.MultipartRequestEntity.writeRequest()

                    urlConnection.setRequestProperty("Content-Type", mre.getContentType());
                    urlConnection.setRequestProperty("Content-Length", String.valueOf(mre.getContentLength()));

                    ChannelBuffer b = ChannelBuffers.dynamicBuffer(lenght);
                    mre.writeRequest(urlConnection.getOutputStream());
                } else if (request.getEntityWriter() != null) {
                    int lenght = (int) request.getContentLength();
                    if (lenght != -1) {
                        urlConnection.setRequestProperty("Content-Length", String.valueOf(lenght));
                        urlConnection.setFixedLengthStreamingMode(lenght);
View Full Code Here

Examples of com.ning.http.multipart.MultipartRequestEntity.writeRequest()

                    /**
                     * TODO: AHC-78: SSL + zero copy isn't supported by the MultiPart class and pretty complex to implements.
                     */
                    if (uri.toString().startsWith("https")) {
                        ChannelBuffer b = ChannelBuffers.dynamicBuffer(lenght);
                        mre.writeRequest(new ChannelBufferOutputStream(b));
                        nettyRequest.setContent(b);
                    }
                } else if (request.getEntityWriter() != null) {
                    int lenght = computeAndSetContentLength(request, nettyRequest);

View Full Code Here

Examples of com.ning.http.multipart.MultipartRequestEntity.writeRequest()

        }

        MultipartRequestEntity requestEntity = new MultipartRequestEntity(parts.toArray(new Part[]{}), null);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try {
            requestEntity.writeRequest(baos);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        InputStream body = new ByteArrayInputStream(baos.toByteArray());
        String contentType = requestEntity.getContentType();
View Full Code Here

Examples of com.ning.http.multipart.MultipartRequestEntity.writeRequest()

        }

        MultipartRequestEntity requestEntity = new MultipartRequestEntity(parts.toArray(new Part[parts.size()]), new FluentCaseInsensitiveStringsMap());
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try {
            requestEntity.writeRequest(baos);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        InputStream body = new ByteArrayInputStream(baos.toByteArray());
        String contentType = requestEntity.getContentType();
View Full Code Here

Examples of com.ning.http.multipart.MultipartRequestEntity.writeRequest()

        }

        MultipartRequestEntity requestEntity = new MultipartRequestEntity(parts.toArray(new Part[]{}), null);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try {
            requestEntity.writeRequest(baos);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        InputStream body = new ByteArrayInputStream(baos.toByteArray());
        String contentType = requestEntity.getContentType();
View Full Code Here

Examples of io.undertow.client.HttpClientRequest.writeRequest()

            @Override
            public void completed(final HttpClientConnection connection) {
                final WebSocketClientHandshake handshake = WebSocketClientHandshake.create(WebSocketVersion.V13, uri);
                HttpClientRequest request = connection.createRequest(Methods.GET, uri);
                handshake.setupRequest(request);
                request.writeRequest(new HttpClientCallback<HttpClientResponse>() {
                    @Override
                    public void completed(final HttpClientResponse result) {
                        try {
                            handshake.verifyResponse(uri, result, connection, callback);
                        } catch (IOException e) {
View Full Code Here

Examples of io.undertow.client.HttpClientRequest.writeRequest()

            @Override
            public void completed(final HttpClientConnection connection) {
                final WebSocketClientHandshake handshake = WebSocketClientHandshake.create(WebSocketVersion.V13, uri);
                HttpClientRequest request = connection.createRequest(Methods.GET, uri);
                handshake.setupRequest(request);
                request.writeRequest(new HttpClientCallback<HttpClientResponse>() {
                    @Override
                    public void completed(final HttpClientResponse result) {
                        try {
                            handshake.verifyResponse(uri, result, connection, callback);
                        } catch (IOException e) {
View Full Code Here

Examples of org.apache.abdera.protocol.client.util.MultipartRelatedRequestEntity.writeRequest()

    RequestEntity request = new MultipartRelatedRequestEntity(entry, this.getClass().getResourceAsStream("info.png"),
        "image/jpg", "asdfasdfasdf");
   
    StringWriter sw = new StringWriter();
    WriterOutputStream os = new WriterOutputStream(sw);
    request.writeRequest(os);
   
    String multipart = sw.toString();
    //System.out.println(sw.toString());
   
    assertTrue(multipart.contains("content-id: <234234@example.com>"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.