Modified the setCurlOption function to allow custom curl options to be added correctly