All language subtitles for 007 The HTTP Package_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
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
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

In the last section, we created a new fetch image method right here, so the purpose of this method

is going to be to make an HTTP request to that outside API, fetch the JSON for one image and then create

a new instance of the image model class out of it.

But clearly, the first thing that we need to do inside of here is make an HTTP request in order to

make a request.

We're going to import a new package into our dart file.

So at the very top up here, I'm going to import a package.

So package Colon called HTP and I want the dart file out of their.

The package is installed into all new flutter projects by default, so we don't have to do any additional

installation, we can just import it directly into our project.

Now, inside of this package, which is maintained by the DART team, we get a ton of different functions

for making HTP requests.

The only function that you and I actually care about is a specific function called get the get function

allows us to, as you might guess, can get HTTP requests.

Let's very quickly look at some documentation around this package just to get a better idea of what's

going on.

OK, so not the documentation which is at GitHub, dotcom start dangling.

So this is the GitHub repository for it.

If you want to, you can visit it on darte leg or pub right here as well.

And we can pull up some of the documentation over here if we want to.

So on the right hand side, you'll find API docs.

We can go there and it will pull up the documentation, so again, ton of functionality tied to this

thing inside of specifically this HTP library right here that is inside of the package.

On the right hand side, you'll see that we get our list of functions.

And so the only function we care about is the function right here.

We use this to make a request to some outside URL so we can call ticket function with some URL and it's

going to make the request.

Now, you'll notice that the return type, which is annotated to the left of the get word right here,

is something called a future.

We'll talk about what that isn't just a moment.

But first, I want to discuss one other little interesting thing about the import statement that we

just wrote.

So we just wrote out an import to grab every single class, every single function, every single property

inside of the package and import it into our current working file.

And as you can see over here, there is a tremendous amount of code not only inside of HTP right here,

but potentially inside of those other libraries of Browsr clients and testing that are part of the package

as well.

So when we write that one import statement, we are adding a ton of code into our project when actually

you and I only care about this one function right here, just the git function.

We don't care about anything else inside this package.

So in order to avoid importing all those additional classes and all those additional functions, we

can make a little change to our import statement.

So up here after the package name, I'm going to write out as or some not as but show get like.

So.

So by putting on a show, get right here.

This means that this tells darte.

Yeah.

We understand HTTP has just like a billion different classes and functions tied to it, but out of all

those we only care about this one git function.

So dump everything else inside there.

We don't care about it.

Just give us this one function.

OK, so that's just going to avoid us importing unnecessary code into our project.

So now that we've got

more time HTP imported into our project and we've got only the get function.

Let's take a quick break.

We'll come back to the next section and make it use that to make an actual request.

So I'll see you in just a minute.

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