如何在POST请求中获取GET和POST请求参数? [英] How can I get both the GET and POST request params, on a POST request?

查看:1580
本文介绍了如何在POST请求中获取GET和POST请求参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个带有Perl后端的Facebook应用程序。问题是,由于Facebook发送请求作为POST请求我的web应用程序,我有一个问题获取也是应用程序的基本URL的一部分的GET参数 - 实际上我只是得到POST参数从$ CGI-> Vars。

rel =noreferrer> CGI / MIXING POST和URL PARAMETERS 。

短版:使用 $ CGI-> param ()用于发布参数, $ CGI-> url_param()用于查询字符串参数。


I'm creating a facebook app with a Perl backend. The problem is that since Facebook sends the request to my web app as a POST request I'm having a problem getting the GET parameters that were also part of the base URL for the application -- in effect I'm only getting the POST params from $CGI->Vars.

解决方案

See CGI/MIXING POST AND URL PARAMETERS.

Short version: use $CGI->param() for post paramenters and $CGI->url_param() for query string parameters.

这篇关于如何在POST请求中获取GET和POST请求参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆