added addHeader to optionally add headers for the request