mirror of
https://github.com/strapi/strapi.git
synced 2025-08-19 06:08:50 +00:00
1 line
51 KiB
JavaScript
1 line
51 KiB
JavaScript
![]() |
(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{221:function(t,s,a){"use strict";a.r(s);var e=a(0),n=Object(e.a)({},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"content"},[t._m(0),t._v(" "),t._m(1),t._v(" "),t._m(2),t._v(" "),t._m(3),t._v(" "),a("p",[t._v("Request header object.")]),t._v(" "),t._m(4),t._v(" "),t._m(5),t._v(" "),t._m(6),t._v(" "),a("p",[t._v("Request method.")]),t._v(" "),t._m(7),t._v(" "),t._m(8),t._v(" "),t._m(9),t._v(" "),t._m(10),t._v(" "),t._m(11),t._v(" "),a("p",[t._v("Get request URL.")]),t._v(" "),t._m(12),t._v(" "),a("p",[t._v("Set request URL, useful for url rewrites.")]),t._v(" "),t._m(13),t._v(" "),a("p",[t._v("Get request original URL.")]),t._v(" "),t._m(14),t._v(" "),t._m(15),t._v(" "),t._m(16),t._m(17),t._v(" "),t._m(18),t._v(" "),t._m(19),t._m(20),t._v(" "),a("p",[t._v("Get request pathname.")]),t._v(" "),t._m(21),t._v(" "),a("p",[t._v("Set request pathname and retain query-string when present.")]),t._v(" "),t._m(22),t._v(" "),t._m(23),t._v(" "),t._m(24),t._v(" "),a("p",[t._v("Set raw query string.")]),t._v(" "),t._m(25),t._v(" "),t._m(26),t._v(" "),t._m(27),t._v(" "),a("p",[t._v("Set raw query string.")]),t._v(" "),t._m(28),t._v(" "),t._m(29),t._v(" "),t._m(30),t._v(" "),t._m(31),t._v(" "),t._m(32),t._v(" "),t._m(33),t._v(" "),t._m(34),t._m(35),t._v(" "),t._m(36),t._v(" "),t._m(37),t._m(38),t._v(" "),t._m(39),t._v(" "),a("p",[t._v('For example "color=blue&size=small":')]),t._v(" "),t._m(40),t._m(41),t._v(" "),t._m(42),t._v(" "),t._m(43),t._m(44),t._v(" "),t._m(45),t._v(" "),t._m(46),t._m(47),t._v(" "),t._m(48),t._v(" "),t._m(49),t._v(" "),t._m(50),t._v(" "),t._m(51),t._v(" "),t._m(52),t._v(" "),t._m(53),t._v(" "),t._m(54),t._v(" "),t._m(55),t._v(" "),t._m(56),t._v(" "),t._m(57),t._v(" "),a("p",[t._v("Return subdomains as an array.")]),t._v(" "),t._m(58),t._v(" "),t._m(59),t._v(" "),t._m(60),t._v(" "),t._m(61),t._v(" "),t._m(62),a("p",[t._v("For example if you want to ensure that\nonly images are sent to a given route:")]),t._v(" "),t._m(63),t._m(64),t._v(" "),a("p",[t._v("Strapi's "),a("code",[t._v("request")]),t._v(" object includes helpful content negotiation utilities powered by\n"),a("a",{attrs:{href:"http://github.com/expressjs/accepts",target:"_blank",rel:"noopener noreferrer"}},[t._v("accepts"),a("OutboundLink")],1),t._v(" and\n"),a("a",{attrs:{href:"https://github.com/federomero/negotiator",target:"_blank",rel:"noopener noreferrer"}},[t._v("negotiator"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("p",[t._v("These utilities are:")]),t._v(" "),t._m(65),t._v(" "),a("p",[t._v("If no types are supplied, all acceptable types are returned.")]),t._v(" "),t._m(66),t._v(" "),a("p",[t._v("In the case of missing accept headers where any type is acceptable, the first type will\nbe returned. Thus, the order of types you supply is important.")]),t._v(" "),t._m(67),t._v(" "),t._m(68),t._v(" "),t._m(69),t._m(70),t._v(" "),t._m(71),t._m(72),t._v(" "),t._m(73),t._v(" "),t._m(74),a("p",[t._v("When no arguments are given all accepted encodings\nare returned as an array:")]),t._v(" "),t._m(75),t._m(76),t._v(" "),t._m(77),t._v(" "),t._m(78),t._v(" "),t._m(79),a("p",[t._v("When no arguments are given all accepted charsets\nare returned as an array:")]),t._v(" "),t._m(80),t._m(81),t._v(" "),t._m(82),t._v(" "),t._m(83),a("p",[t._v("When no arguments are given all accepted languages\nare returned as an array:")]),t._v(" "),t._m(84),t._m(85),t._v(" "),a("p",[t._v("Check if the request is idempotent.")]),t._v(" "),t._m(86),t._v(" "),a("p",[t._v("Return the request socket.")]),t._v(" "),t._m(87),t._v(" "),a("p",[t._v("Return request header.")])])},[function(){var t=this.$createElement,s=this._self._c||t;return s("h1",{attrs:{id:"request"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#request","aria-hidden":"true"}},[this._v("#")]),this._v(" Request")])},function(){var t=this.$createElement,s=this._self._c||t;return s("p",[this._v("A Strapi "),s("code",[this._v("Request")]),this._v(" object is an abstraction on top of Node's vanilla request object,\npro
|