public void setCustomHttpHeader ( String headerName , String headerValue ) { if ( CONTENT_TYPE . equals ( headerName ) || HOST . equals ( headerName ) || CONTENT_LENGTH . equals ( headerName ) ) { throw new XMLRPCRuntimeException ( "You cannot modify the Host, Content-Type or Content-Length header." ) ; } httpParameters . put ( headerName , headerValue ) ; }
Set a HTTP header field to a custom value . You cannot modify the Host or Content - Type field that way . If the field already exists the old value is overwritten .