A plain old web_reg_save_param() should do it even though it has been marked as deprecated.
If that doesn't work you may need to look into how you actually get the response. Are you placing the web_reg_save_param() in the correct location (which is right before the actual request that returns what you want to capture)? Are there any redirects? And so on.
web_reg_save_param("pCodeId", "LB=code_id=", "RB=&", LAST);