REFACT rest-client
FIX data.length in header crash