All language subtitles for 010 Handling DELETE Requests_Downloadly.ir_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
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 Download
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

Finally, let's now handle the lead requests,

as well.

And just like in the previous lecture,

I will not actually implement the deleting

of a resource in our route handle.

Okay?

So, that is not necessary because, again,

we are only dealing with files,

which is not a real world scenario, okay?

So I simply went ahead and copied the handler

that we created in the last lecture.

And so let's just do some quick changes here

to handle the delete request, as well.

So, the first thing is of course,

this method here which is now not patch, but delete.

Okay?

Then we still need to pass in an ID

for the tour that we actually want to delete.

And then let's also change our response.

So when we have a delete request,

the response is usually a 204.

And 204 means no content.

And so that's because, as a result,

we usually don't sent any data back.

Instead, we just sent null, okay?

So the status is still a success, but the data is null,

simply to show that the resource that we deleted

now no longer exists.

So that is what null means.

Okay?

So pretty similar to patch,

the difference here, in this case here,

is that we change the delete method,

we change the status code to no content, which is 204,

and the data that we send back is null.

Okay, and so even in the real world,

that is exactly the response that we're gonna send back.

Okay, so now all we have to do go, ahead and test it out.

And using of course, delete.

Let me also save it here as delete tour.

And so let's pretend that we want to delete

tour number seven.

Again, that's not gonna do anything.

And so here we have our tool for no content.

And actually, Postman then indeed shows us here

no content at all.

So it doesn't even show us the adjacent that we sent back.

It simply gives us 204 no content.

Okay?

So let's just save it here.

We have it here on the left side now, as well.

And you'll see that our collection here is steadily growing,

so that's really cool.

Now, in the next video

we will actually make our code look a bit nicer.

So organize it and follow some best practices

to make our code a bit less messy.

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