Changing send method so it posts json instead of form data