Refactor Internal.Request module to reuse pattern matching logic.

Signed-off-by: OwenPatey <owen_patey@hotmail.com>