Making content type generic.
Adding in illegal argument exception when request is absent.
renamed custom* to fromRequest*