美文网首页
【laravel:5.1】HTTP

【laravel:5.1】HTTP

作者: 张健飞 | 来源:发表于2016-12-02 15:40 被阅读0次

http 与 routing 互为补充。

在 helper.php 中, 函数 带参数与不带参数, 调用不同

Request

Request.php 继承 Symfony\Component\HttpFoundation\Request

参数包:

ParameterBag.php

FileBag.php

HeaderBag.php

ServerBag.php

Response

Response.php 继承Symfony\Component\HttpFoundation\Response

RedirectResponse 继承Symfony\Component\HttpFoundation\RedirectResponse

redirect()  // 不带参数, 得到 \Routing\Redirector

redirect('xx')  // 带参数,得到 \Http\RedirectResponse

其他种类:

JsonResponse.php

ResponseFactory.php  // 来自 Routing\ResponseFactory.php

//  通过 helper.php 函数 response() 不带参数来访问

方法: make

view

json

jsonp

stream

download

ResponseHeaderBag.php

相关文章

网友评论

      本文标题:【laravel:5.1】HTTP

      本文链接:https://www.haomeiwen.com/subject/fwcqmttx.html