Added support for REST method preamble code injection.