All language subtitles for 001 Responses, Codes, Headers, and Cookies_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

Apart from returning the text or a view rendered using blade templates, Laravel has ways to build our

proper HTP response with all its features like response codes, setting cookies and setting response

headers.

For the purpose of this lecture, let's create Adami route with the fun slash responses you are I.

Now, a lot of the way is to use its helper functions, the response function will create a new response

object.

This object has methods like header or kookie.

The response function accepts the free parameters, all optional, first is the content to return.

Second, the status code and third is an array of response headers.

So why won't we return the Post's variable that we actually have in this file?

But first, we need to use it for this function.

So posts will be a content.

Let's change the status codes to something else, maybe two hundred one and let's leave the headers

empty.

There, Heather Medalled says the response header like contents typed, for example, tying the browser

what to expect from their content, whether it is HTML or JSON.

So let's return something that would be understood as Jason.

Now, Cookie says the browser cookies.

Cookies are useful to keep users specific data on the browser side.

This is used to implement features like User Session or are Remember Me feature of a logged in user.

So let's set an example, Cookie with that.

My cookie name, the value being my name and the cookie should expire after three thousand six hundred

minutes, which is one hour.

Now, let's get back to the status codes in all responses returned to status code, these codes have

meaning the most common across the web is 200, meaning OK for all four meaning not found and 500,

which is internal server error.

Though with traditional websites, you'd rarely see anything but those free above when developing API

is the full spectrum is useful.

Take a look at the link from the Amde N.

To read more about all the possible codes that you might use and encounter.

So how using the response helper is different from using the view helper function, you might ask?

When and why you should use which?

That is simple use response helper when you need to do something extra, like setting a header or a

cookie or change the response status code, by the way, the response helper function creates a response

object, which also has the view method, which accepts exactly the same arguments as this separate

view helper function.

So you can also render blade views while adding headers cookies and changing the status code.

There is also a simpler way to return Jassam done adding content type header explicitly, but will get

to it in a couple lectures.

Finally, let's see this in action heat, this farm slash response, says Eurorail in the browser,

you won't see anything special, but if you open the network tab, you can see a different response

code to the one we've sent all called response header.

Is there the content type that we have said to application Jason and the cookie we've created called

my cookie, which you can also verify in application type cookies on the left and during this?

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.