protected Response httpPostCSV ( String path , String csvBody , int status ) { MultiPartSpecBuilder multipart = new MultiPartSpecBuilder ( csvBody . getBytes ( ) ) ; multipart . mimeType ( "multipart/form-data" ) ; multipart . fileName ( "file.csv" ) ; return httpRequest ( status , "multipart/form-data" ) . multiPart ( multipart . build ( ) ) . header ( "Authorization" , "Basic YWRtaW46cGFzc3dvcmQ=" ) . post ( baseURL + PATH_PREFIX + path ) ; }
Posts the given CSV as multipart form data to the given path and expect a 200 status code .