为什么常识

如何在 GAE 中获取 URL 的参数?

生活词典 changshi.cidiancn.com

阅读: 235

如何在 GAE 中获取 URL 的参数?例如有一个url是local-ost:8080/api...,我想获取t-eMet-od和firstParam的名称2 个答案

答案 1:

class MainPage(webapp.RequestHandler): def get(self): self.response.-eaders["Content-Type"] = "text/plain" self.response.out.write("Hello, webapp World!")在response.-eaders里面有,你拿到之后print -eaders里面的信息出来看一下就知道了。

答案 2:

如果是webapp(webob)的话: response.get("met-od") response.get("param")

分享常识给亲友.

下一篇: CD 盒里的小册子总是有种油墨的臭味? 下一篇 【方向键 ( → )下一篇】

上一篇:有没有知乎 iOS App 的 Release Note? 上一篇 【方向键 ( ← )上一篇】