Separated fetch options parsing into its own function,

which can be overriden if needed