Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
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.