@ Override protected HttpURLConnection getConnection ( ) throws HelloSignException { if ( fields != null ) { for ( String key : fields . keySet ( ) ) { if ( fields . get ( key ) instanceof File ) { return postWithFile ( ) ; } } } return postQuery ( ) ; }
Helper method to make an HTTP POST request . Intelligently detects whether Files have been attached and sends as an multipart form request .