* Fix #5420 add headers from configuration object * Add baseOptions undefined checking #5420 * Update the samples and replace array to object #5420 * Update sample