Remodeled the fix

The first fix dident work as i dident overlook how the code flow worked, i added a new metod beforeSend where i invoke it if it exists and merge to this.options.remoteOptions the code is tested and works.