Package com.github.restdriver.serverdriver.http

Examples of com.github.restdriver.serverdriver.http.ByteArrayRequestBody


     * @param content Request body content as a byte array.
     * @param contentType Content-Type eg application/pdf.
     * @return The new request body instance.
     */
    public static ByteArrayRequestBody body(byte[] content, String contentType) {
        return new ByteArrayRequestBody(content, contentType);
    }
View Full Code Here


            bytes = IOUtils.toByteArray(content);
        } catch (IOException e) {
            throw new RuntimeException("Error converting stream to bytes", e);
        }
       
        return new ByteArrayRequestBody(bytes, contentType);
    }
View Full Code Here

            bytes = IOUtils.toByteArray(content);
        } catch (IOException e) {
            throw new RuntimeException("Error converting reader to bytes", e);
        }
       
        return new ByteArrayRequestBody(bytes, contentType);
    }
View Full Code Here

TOP

Related Classes of com.github.restdriver.serverdriver.http.ByteArrayRequestBody

Copyright © 2018 www.massapicom. 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.