0:00:00
all right um welcome back guys another
0:00:02
day another episode of
0:00:05
bill break and fix um for
0:00:08
and all of the you guys who are new here
0:00:10
we are roar coders we
0:00:11
stream every day from 9 30 to
0:00:15
10 30 pm and on weekends we go to 11 30.
0:00:19
so today is a special episode for bill
0:00:21
break and fix as we have our first
0:00:24
on our this very own series which has
0:00:27
only kind of 15 years old um at least on
0:00:30
social media so let's introduce brad
0:00:33
brad do you want to give you a small
0:00:36
yeah sure hi i'm brad um
0:00:40
and i'm a developer in melbourne
0:00:43
i mean yeah being invited on today
0:00:47
that's pretty cool so we met brad
0:00:50
you know we keep mentioning which is
0:00:53
devcorp so that's it's good to i'll be
0:00:57
out there and join
0:00:59
these communities and you meet um some
0:01:02
so yeah we are really excited to have
0:01:07
um thanks for uh check us
0:01:11
thanks for accepting the in invite brad
0:01:14
really appreciate it um you know uh
0:01:18
coffee i was just gonna do a bit for
0:01:28
welcome brad hill but then
0:01:32
the timing wasn't right at all so i was
0:01:35
don't worry what anyway yeah continue
0:01:39
yeah so before session today
0:01:43
i'd like to thank our sponsors we stream
0:01:47
um cemia is a very exclusive streaming
0:01:51
service stream management service i'd
0:01:52
say which helps you manage
0:01:55
your live streams on different platforms
0:01:59
anything from youtube facebook um
0:02:02
or twitch as well as vr on twitch as
0:02:06
so it's really basic you just go ahead
0:02:08
and add your destinations as we have
0:02:11
and you go ahead and just click create
0:02:14
should just be in live in a matter of
0:02:17
and you can invite your guests as well
0:02:19
like we have brad today so
0:02:21
cool um let's get back to business
0:02:25
fantastic all right so
0:02:29
yesterday we were working on fetch apis
0:02:33
it wasn't coming in what was it
0:02:39
it was coming in the post board
0:02:43
name but it was going as soon as it came
0:02:46
in so we probably have to work on that
0:02:50
part today um okay i'll just try running
0:03:01
brad have you worked with batch
0:03:08
i don't believe i have okay
0:03:17
learning experience for all of us
0:03:21
yeah yeah thousand
0:03:24
right and that's weird um so you would
0:03:28
wanna put four slash and then homie.html
0:03:33
and then do a test so
0:03:36
just so brad can get up with an idea of
0:03:39
what we're trying to do here
0:03:41
you know that part that's a t-e-s-t
0:03:48
when we press the go button we are
0:03:51
trying to send it to the api
0:03:54
as in to the back end that's already
0:03:58
at the moment and we are receiving that
0:04:02
same error i'll open up uh
0:04:05
aws online on my end
0:04:09
you need to share um start chilling yeah
0:04:13
uh or do i have to
0:04:21
think we need to cut that out
0:04:25
yeah um that's all right
0:04:29
yeah did you start hearing it
0:04:33
i'm just logging in at the moment
0:04:42
and just oh it seems i forgot my
0:04:46
hang on i'll just my
0:04:49
screen a bit smaller so you can
0:04:52
fit into my other screen and then get
0:04:55
the browser off into this online
0:04:57
update and then share my screen
0:05:00
all right um cool welcome alexa welcome
0:05:05
andre says that we should all have a
0:05:07
drink to stay hydrated
0:05:09
i have some iced teas that yeah
0:05:12
i've got some water water spondre
0:05:16
big bottle of um cold water
0:05:20
nice that's brilliant so
0:05:23
just quickly log into
0:05:34
so is um fetch a node package
0:05:37
to allow you to do um api requests
0:05:44
sorry i didn't didn't get that
0:05:47
i was just asking what fetch api was
0:05:54
so we are still in the process of
0:05:56
getting to know it but
0:05:57
in my from my understanding right now um
0:06:01
it is kind of the way how backing in
0:06:03
front and communicates
0:06:04
i don't think it's a note package um
0:06:08
jen do you have anything to say on that
0:06:11
so yeah i wouldn't think it's a no
0:06:15
you you you're probably right there
0:06:18
graphic basically what how
0:06:21
i understand fetch api that it's a kind
0:06:25
middleware so it's just between the
0:06:30
backhand and helps them talk so
0:06:33
kind of an interface that allows you to
0:06:37
make http requests to the server from
0:06:45
from your um web browser essentially
0:06:51
okay does that make sense brad yeah so
0:06:55
using um html forms ins that's
0:06:59
not the same thing here we're going with
0:07:02
a middleware that allows us to
0:07:04
communicate without having to reload a
0:07:10
basically sending the api to the back
0:07:12
end without having to
0:07:14
yeah i'm i'm yeah pretty much yeah
0:07:17
yeah cool i would say so yeah that would
0:07:25
awesome all right so
0:07:28
this is our api that we
0:07:32
as in so when i say uh
0:07:35
we've already done the api
0:07:39
there's basically a sam app and we've
0:07:43
deployed it on cloud cloud formation and
0:07:52
getting that cause as in the cross
0:07:56
error so we're just trying to resolve
0:08:00
that since yesterday yep so we need to
0:08:03
go ahead and add a module
0:08:17
so we needed to add the model
0:08:20
here first so we need a model system for
0:08:23
our json application
0:08:29
model model schema
0:08:41
i did google it it's it's nothing really
0:08:43
complete complicated we just need to
0:08:46
put um that board id is a string or
0:08:50
note id the string board name is gonna
0:08:54
okay cool yeah cool so i'll just do that
0:08:57
um i'll just also zoom in i don't know
0:09:01
if you guys can actually see my screen
0:09:04
or even the viewers can
0:09:08
is it i'm not seeing you right now
0:09:11
yeah i'm seeing your um web browser yeah
0:09:15
perfect that's exactly what
0:09:18
you're supposed to be seeing and
0:09:21
my i wouldn't really bother with the
0:09:25
because it's not compulsory so
0:09:29
um i sent you a link okay i'll have a
0:09:35
uh i'll just open that
0:09:39
link on here because i really i'm a
0:09:42
fan of actually showing the thought
0:09:48
yeah that's good so
0:09:52
basically this is the limit configure
0:09:56
it's basically talking about the models
0:09:58
that it represents the collection of
0:10:01
data models for an api support ah
0:10:05
okay only for web sockets
0:10:08
ah yeah can you go down a bit um
0:10:19
this is the one isn't it
0:10:25
this one responds no the next one
0:10:30
this one this is bro maybe the next one
0:10:33
as well i don't know which one
0:10:34
whichever we just need to kind of assign
0:10:38
um that i'll just use this one
0:10:41
we can give it a try
0:10:45
yeah of course so that would be
0:10:52
yeah and um and the other one
0:10:56
would be our uh borden
0:11:07
um what's that string or collection
0:11:10
board note is a collection it's an array
0:11:15
but how would this understand that this
0:11:19
maybe try an object
0:11:23
just has the string maybe don't dodge it
0:11:26
it's fine probably yeah i'll
0:11:33
i'll tell you what happens yeah
0:11:36
leave note id for now as well yeah
0:11:42
actually i need to set my
0:11:45
mac a certain way that i can see
0:11:48
properly as in the big screen
0:11:51
cool okay so create this one
0:11:54
invalid model specifier validation
0:11:57
validation results warning and use
0:12:01
unsupported keywords
0:12:04
oh okay so it doesn't allow these
0:12:12
once again so it should come inside the
0:12:15
um open the link again
0:12:26
yeah like that inside no go down
0:12:30
like inside the item all right
0:12:52
basically this is as in one of the
0:12:55
columns and i would done with
0:13:02
so brad andre asked can we donate on
0:13:05
have you used much aws brad andre asked
0:13:16
and right i touched a little bit
0:13:20
on um one of the database solutions but
0:13:23
escapes me at the moment
0:13:32
yeah there's a few so the answer is is
0:13:36
pretty much other than just hosting uh
0:13:38
little small web servers
0:13:40
through uh acs australia
0:13:45
yes what was it with
0:13:58
that's pretty cool actually i'm thinking
0:14:01
or s3 buckets that's what
0:14:06
it's it's not a database it's a store
0:14:08
it's a storage solution right
0:14:10
yeah that's that's better than not doing
0:14:15
you you know how it works in the cloud
0:14:22
so what text do you generally work on
0:14:26
sorry what what text tags do you
0:14:30
um um most of the time i use
0:14:34
php um php five and seven
0:14:41
right and then um the no
0:14:45
real front-end solutions unfortunately
0:14:52
template rendering through services like
0:14:57
symphony old old versions of symphony
0:15:04
no that's cool um so right now do you
0:15:07
work somewhere or do you study
0:15:09
oh yeah right now i'm actually working
0:15:11
as a learning management system
0:15:14
for a hospital so um my work at the
0:15:18
technical but it's supporting the
0:15:23
ongoing process of effectively
0:15:26
a client management system that also
0:15:29
what learning people have done right
0:15:33
nice that must have been fun yeah it's
0:15:38
certainly a lot it's a lot less
0:15:39
complicated and somewhat
0:15:41
less stressful than um that's true
0:15:45
i know what you mean now all right
0:15:49
um what do we have here is in
0:15:53
i'm still working on that model thing
0:15:58
what what's the error which we are
0:16:03
same thing as in support things
0:16:08
unsupported keywords it looks like it's
0:16:10
looking for particular keywords there
0:16:12
to start and define the model um
0:16:16
yes do you uh do you need to include
0:16:24
uh that's what so this is what i was
0:16:27
hoping for would do the trick
0:16:29
for us but being adapted to
0:16:33
our needs but apparently that doesn't
0:16:37
and i'm pretty sure i'm doing something
0:16:40
wrong so just trying to find
0:16:46
where exactly am i going wrong there's
0:16:50
uh models model schema
0:16:54
there i'm not sure if that's what you i
0:16:56
just below that in
0:16:57
in the top oh wait no that's all the
0:17:00
okay i'm sending a link on
0:17:04
that pretty much goes over
0:17:07
um what models are like in detail
0:17:11
it's a documentation link only so you
0:17:14
might have to go in detail
0:17:16
then mice won't be a easy solution
0:17:19
probably model defines a data structure
0:17:29
wow i'm already learning a lot now
0:17:35
an api wanted to find the data yeah
0:17:47
i know that they uh i experienced this
0:17:51
and there was actually a question on
0:17:53
stack overflow or probably a tutorial
0:17:56
where it took us in detail
0:17:59
actually let me do one thing
0:18:03
i'm gonna go into one of my other
0:18:08
apis and see what i did there
0:18:11
because i have faced this error from my
0:18:18
right and that was for i think my
0:18:21
personal website which was
0:18:25
along the lines of um
0:18:29
get expertise probably
0:18:38
because a in in my personal
0:18:41
website i actually paid as a micro
0:18:45
service as well and i had this
0:18:48
same issue so this is clearly not the
0:19:02
i am trying and get
0:19:16
okay please tell me this is the one
0:19:19
yeah that's the one so i actually
0:19:23
left it empty right right okay
0:19:27
that's one way to do it i suppose i'm
0:19:31
figuring out well the fastest
0:19:35
thing that comes to my mind so
0:19:41
json empty and then this is empty as
0:19:45
let's do this and see if this actually
0:19:58
okay this is ours which one was this
0:20:03
which one was this
0:20:06
as fate yeah that was the one
0:20:16
yeah i keep on saying i need to invest
0:20:20
my in the internet but i don't end up
0:20:24
just i need to really put my head down
0:20:28
once and actually do do some
0:20:31
make a call it's only three three clicks
0:20:35
you just need to click upgrade
0:20:41
but who knows if you talk to them
0:20:45
being a really nice person you might get
0:20:48
a pretty good discount as well
0:20:52
that's what i'm after
0:20:55
to be honest okay so if i could
0:21:02
cool so that works for now i don't
0:21:06
care if it's wrong or right but i
0:21:09
want as in i want the api to
0:21:19
yeah i'm going to do that now i know
0:21:21
what it's called i forgot
0:21:23
and then yeah in the options
0:21:26
you have to enable it ah yeah
0:21:30
cool so enabling the cause
0:21:34
brad have you worked with uh apa get
0:21:39
no this is all new and i'm learning a
0:21:44
i'm glad so am i to be honest
0:21:48
um it was in this one isn't it
0:21:54
ad integration yeah these
0:22:04
doesn't seem right to me
0:22:07
integration responses oh yeah go back um
0:22:10
it's meta responses
0:22:11
yeah here we go cool there we go
0:22:15
so add a response model which was
0:22:20
application content type
0:22:28
json and then yeah hey empty model
0:22:35
just save all right yeah i'll go ahead
0:22:38
think hang on um would i need to
0:22:42
deploy this again because we have
0:22:45
made some changes already okay
0:22:50
i need to enable the calls first
0:22:54
it will call yes replace
0:22:59
brilliant and i'll just deploy again
0:23:03
just to make sure no that's good
0:23:06
stage pride i don't really care the
0:23:09
long as it gets deployed
0:23:12
okay here we go cool uh if you want to
0:23:16
try and send a request copic and you can
0:23:20
change your screen now
0:23:25
brilliant there we go yeah cool
0:23:46
let's see what arrow comes up
0:23:58
and then input the board name
0:24:07
inspect brilliant console
0:24:12
uh what does it say from board has been
0:24:17
blocked by cause policy response to pre
0:24:22
same stuff isn't it
0:24:34
i think we need to study the course
0:24:42
okay um do you wanna a
0:24:46
card refresh your browser and then
0:24:49
try again because sometimes i feel
0:24:52
that uh takes effect as well
0:24:57
with the local host what was the command
0:25:22
not creating an error though
0:25:25
not throwing an error while
0:25:37
um here we go there's there again prod
0:26:00
and can you expand that post
0:26:05
middle post board name on click ok
0:26:08
that's just telling basic comments
0:26:12
so access to fetch executor
0:26:17
from origin that one
0:26:20
has been blocked by course policy
0:26:24
can you copy and paste that text
0:26:30
see what it comes up with
0:26:38
because i think i might have missed
0:26:41
a step or two yeah i'm pretty sure we
0:26:45
kind of do it right now yeah
0:26:57
go to have one of this stack overflows
0:27:03
what is the um error
0:27:08
basically uh causes blocking
0:27:11
policy responsibility
0:27:14
do not pass control check it does not
0:27:17
have a http okay status
0:27:25
i determined for a different domain okay
0:27:28
a different domain yeah
0:27:32
of course that's what causes
0:27:35
it it must include an origin header
0:27:41
wait a minute um we don't actually
0:27:45
have a header i mean our header
0:27:49
is not a header object it's just
0:27:53
um you know how you declare a header
0:28:01
header is equal to capital let's header
0:28:05
i don't i forgot how to do it but
0:28:08
and what i think what might be happening
0:28:12
is that in the code and in it
0:28:16
we have done in aws
0:28:20
we might need to do it in the code as
0:28:25
so then match i'm thinking
0:28:28
so i don't know headers set
0:28:36
creation you had a ah
0:28:40
yeah so that's how we actually create
0:28:42
headers and then you append it
0:28:45
all right so yeah we might want to try
0:29:05
i have a question in the chat from gc
0:29:08
dev oh asking what my favorite
0:29:11
programming language
0:29:12
is yeah it'd be python
0:29:17
nice one why is that
0:29:20
readability and it's um ease of just
0:29:24
downloading packages to get um things
0:29:28
yeah second to none in this pip
0:29:31
instagram yeah basically what i need to
0:29:40
true though as in i've observed the same
0:29:44
python there all you you need is
0:29:47
just to import the import the package
0:29:51
just add one or two lines of code
0:29:55
max and boom there you go you've got
0:29:58
your thing working
0:30:01
yeah not everything works like that
0:30:08
that's why it's called programming isn't
0:30:12
it's full of surprises
0:30:17
um so what was the outcome there coffee
0:30:22
trying to do something just give me two
0:30:42
i'm just thinking that do we have to
0:30:45
car set equals utf-508
0:30:49
in the content type this line
0:30:52
23. i i i don't know why we do that
0:30:57
i i'm not sure me neither
0:31:01
all right anyway just continue
0:31:10
why does it want declaration officer
0:31:15
um i think you have an extra
0:31:20
curly braces and a round bracket yeah
0:31:28
okay the second one thing
0:31:35
there's a header yeah there it is right
0:31:38
inside the function
0:32:06
myself here as well yep
0:32:09
so that we can get two points off
0:32:20
some help in the chat your post
0:32:24
body needs to return
0:32:27
well all right so you're on a method
0:32:34
oh um there was something related to
0:32:38
as in kind of method
0:32:41
or chords yeah i think that's what
0:32:45
andre is talking about mood yeah
0:32:50
mode probably yeah um
0:32:53
i'm just looking do we need to
0:32:57
have a course policy there or
0:33:10
hmm let's see okay
0:33:16
and see where it can cause
0:33:33
let's see what happens now let me
0:33:50
once the page loads just hey
0:33:54
it works and muscle
0:33:59
okay um i'm just gonna send you this
0:34:05
then basically we we might
0:34:08
need to oh the server response needs the
0:34:13
um in the when you're setting up the
0:34:17
um type that empty model you had some
0:34:22
listed to the left there i'm wondering
0:34:26
you can um include that there
0:34:33
response needs the course header headers
0:35:00
um oh wait you won't be able to hear it
0:35:07
there i could hear myself it was
0:35:10
oh is it still doubling up no no
0:35:14
it's stopped now okay um
0:35:17
in in aws i think you could set up the
0:35:20
headers the api was responding with
0:35:26
oh yeah this is exactly what you're
0:35:41
these are the course and we did access
0:35:44
allow region and all
0:35:53
we are you guys looking at my screen can
0:35:54
you see it yes yeah okay
0:35:59
are you on docs.aws.amazon.com
0:36:08
um if you can go to
0:36:11
a filling there on red descent
0:36:20
that'll be interesting
0:36:27
try and convert into the chinese
0:36:34
are you able to copy um
0:36:37
no but i'm just gonna type it okay
0:36:43
i was able to um copy it
0:36:47
okay if you can just have you go access
0:36:50
the private chat yeah
0:36:54
okay if you can just um post it there
0:36:57
and then we can take it from there yeah
0:37:02
i'd like to help at least one way
0:37:10
don't worry about it
0:37:14
apparently it's the code near the bottom
0:37:16
oh we've got some code here
0:37:26
that's impossible as well
0:37:42
oh so if you go down where the
0:37:46
code is copic it actually explains how
0:38:02
so basically we are missing the whole
0:38:05
response object apparently in our api
0:38:10
uh in our fetch api
0:38:17
right okay your back end is
0:38:28
for lambda proxy are we using a lambda
0:38:32
or http proxy integration
0:38:38
um i think it was a lambda proxy
0:38:41
from what i can remember hang on i'm
0:38:44
gonna have to check that officers
0:39:00
thank you for those links um
0:39:34
sorry guys my internet is a bit slow so
0:39:37
taking more time than expected
0:39:44
are you showing your screens in for now
0:39:47
no i'm just trying to find out
0:39:51
um what brand mentioned
0:39:55
and then if the uh api is http or
0:39:59
lambda proxy yes trying to find out that
0:40:05
let's see response needs so in
0:40:08
in your um api gateway where you're
0:40:11
empty model yeah you had the ability to
0:40:17
there i'm thinking if you add the cause
0:40:21
headers there they might work
0:40:24
okay yeah we can try that as well that's
0:40:28
good point so i'll just try that
0:40:31
and guys show your screen then
0:40:35
um we can have a look as well
0:40:39
okay maybe you need to dedicate one of
0:40:45
raw coders to zane upgrading his
0:41:00
as a special guest true
0:41:05
that'd be hilarious though okay
0:41:09
okay cool so i'm just gonna do that
0:41:13
actually i already had to open the white
0:41:18
see i'm just going to zoom in
0:41:22
so you guys can see as well oh
0:41:25
um the models and i need
0:41:29
brad you mentioned that we might try
0:41:40
i just remember seeing it um
0:41:44
in the um in the options section sorry
0:41:49
are your method responses
0:41:52
is that not where we were before um
0:41:56
i think we were in them options
0:41:59
yeah we were in the options you might be
0:42:02
i took the wrong and it says prop
0:42:05
yeah and then um in that response there
0:42:10
yeah oh you've got them there so you've
0:42:12
got allows control headers
0:42:18
okay and are those the same star
0:42:21
as you would expect or is that not a
0:42:25
i can't imagine adding star would be
0:42:29
um i think one what we might do is
0:42:33
do a start as well just to just to
0:42:40
and wait with the star
0:42:43
um in the code i made it a star
0:42:46
um i mean it's bad security but
0:42:54
what did you type in i'll just do that
0:42:58
as well and see if this makes any
0:43:02
i'll tell you what's in the code it says
0:43:06
um allow region um that's a start
0:43:20
like this you can't give it a value
0:43:24
can you that's just a name but
0:43:28
wait a minute what
0:43:33
where do you go and
0:43:36
it's okay uh andre
0:43:39
just said that star is okay for dev
0:43:43
yeah that's what i thought
0:43:47
how would you do it in this
0:43:50
it seems like you should be able to um
0:43:54
type the colon in there
0:43:58
right there again control
0:44:06
and then um colin yes star
0:44:09
i believe this way yeah yeah
0:44:13
it's um no we can't do that
0:44:16
the parameters should match the
0:44:18
following expression
0:44:34
yeah it's um it's failing based on that
0:44:36
regex up there and um yeah
0:44:41
without uh being so good at regex it
0:44:44
seems to be saying
0:44:46
any uh letters big letters like capital
0:44:50
letters numbers okay
0:44:53
i'll just go back to my api that was
0:44:57
working that i did ages ago
0:45:01
and see what did i do there
0:45:05
in terms of this interesting
0:45:12
wow 15 minutes more to go
0:45:17
okay you get user data
0:45:30
okay so we did the stage
0:45:33
no as in your resources and options
0:45:45
what did i do there come on internet
0:45:50
give me some loving okay so integration
0:46:00
okay so we didn't really add any any
0:46:09
didn't add anything there yeah
0:46:20
uh i i just had a thought to check which
0:46:23
you are using the right um rest
0:46:27
string um to access that
0:46:31
yep you've confirmed that
0:46:35
yes um coffee you would be able to
0:46:45
oh um okay i can do that
0:46:48
i mean i did try opening the endpoint
0:46:50
just now and i got the boards
0:47:03
actually um andres saying
0:47:06
our bread can do this more than really
0:47:10
yeah on dryer i'll
0:47:15
i'll i really love that if that happens
0:47:18
yeah um if we don't solve this right can
0:47:23
i get to post the cycle overflow
0:47:32
days has it been this is our third day
0:47:35
third day ellie's doing the post method
0:47:39
yeah okay then yeah um
0:47:42
i can allow that um
0:47:46
you know watch youtube video i'll be
0:47:48
back in five minutes
0:47:50
okay i found a youtube video on exactly
0:47:54
what you're trying to do so
0:47:59
so what i'm gonna actually do is open up
0:48:03
my one of the other repos
0:48:06
and see what i actually did there
0:48:11
well i have got a feeling that we might
0:48:14
need to include what where we have
0:48:19
api gateway back in the code as well as
0:48:25
the schema and the api itself
0:48:29
if that makes sense yeah i don't
0:48:32
understand what you're saying uh just
0:48:38
repo where i was actually using that
0:48:44
index.js update appear
0:48:47
euro yeah that was the one so here i'm
0:48:50
although i'm simply using ajax
0:48:59
yeah that's fine i don't really have any
0:49:04
that just seems like a simple um hmm
0:49:07
a really simple uh get there
0:49:12
uh any changes to them made here
0:49:23
share the video and watch together
0:49:30
andres says they share the video and
0:49:35
oh okay yeah i'm not sure if it's the
0:49:38
right video um looks like it um
0:49:42
okay i'll share my screen
0:49:47
oh right can you guys see my screen
0:49:50
yes yep yeah this is aws posted video so
0:49:55
um they have the same error once second
0:49:57
i'll increase it okay
0:50:00
that's a bit better cross polishing
0:50:03
it's being blocked by calls but no
0:50:05
access control origin let's see
0:50:07
we don't have that but let's see what
0:50:12
to see more information about the
0:50:13
headers that are returned in the
0:50:16
and their corresponding values check the
0:50:20
now to avoid the error no access control
0:50:24
allow origin header is present on the
0:50:26
requested resource
0:50:27
for a public rest api verify the
0:50:31
the rest api resource is configured with
0:50:33
an options method that returns
0:50:35
the required course headers the http
0:50:40
put post etc associated with the
0:50:45
are also returning the required course
0:50:48
in case of both proxy and non-proxy
0:50:53
let's see how we can configure course
0:50:57
from the api gateway console for this
0:51:01
can i just like increase the speed is
0:51:13
i admire your speed of listening and
0:51:16
reading trust me i really do
0:51:20
let's not anywhere
0:51:24
the resources complement to enable
0:51:26
course on this resource
0:51:28
select this resource and choose actions
0:51:31
enable course now while enabling course
0:51:34
also select these check boxes for adding
0:51:36
course headers for gateway responses
0:51:39
for example select default 4x6 and
0:51:42
default 5xxx so that the api gateway
0:51:44
sends the required headers
0:51:46
even if the request doesn't make it to
0:51:48
the endpoint so that a gateway response
0:51:51
for example in case of missing
0:51:53
authentication token error when the
0:51:54
resource path entered is invalid
0:51:56
we use the gateway response you can also
0:52:00
select the http methods configured with
0:52:03
where you want to enable the course
0:52:04
headers after we enable course
0:52:07
on an http method in api gateway an
0:52:11
is added to the resource if it is not
0:52:15
also the 200 response of the options
0:52:18
is automatically configured to return we
0:52:22
um post on this thing when we added
0:52:27
that's exactly what i was looking at
0:52:31
yeah and we didn't get a 200 response
0:52:33
but let's see what she did
0:52:34
one sec the three access control allows
0:52:37
star headers to fulfill
0:52:39
the pre-flight handshakes we can see an
0:52:42
options method is covered for this
0:52:43
resource with mock integration
0:52:46
also if you select the integration
0:52:48
response section of this method
0:52:50
you can see that the course headers are
0:52:53
similarly the course headers are added
0:52:55
to the get and post methods
0:52:59
all configured we didn't even do that
0:53:04
but what's content called x amc did i
0:53:07
think one that way for us is
0:53:12
for this resource note that if you are
0:53:15
a proxy integration with your http
0:53:17
method you must send the required course
0:53:19
headers from the backend itself
0:53:22
after you enable these settings and send
0:53:24
the required course headers
0:53:25
you can resolve the error while
0:53:27
accessing your api
0:53:28
thanks for watching and happy thank you
0:53:35
can you watch that again please surely
0:53:39
i'll just watch it from where the stuff
0:53:41
starts yeah of course
0:53:49
proxy and from the api gate test
0:53:52
to enable course on this resource select
0:53:54
this resource and choose
0:53:56
actions select enable course
0:53:59
now while enabling course also so we
0:54:02
have to enable course on the api not the
0:54:06
on the appear not the options yes i'm
0:54:10
just doing that as
0:54:11
we speak enable cause
0:54:15
yes existing okay yeah that's done
0:54:21
continue please um in the access control
0:54:26
can you put applications uh forward
0:54:33
application force like json
0:54:37
in the access control allow headers
0:54:40
oh yeah yeah yeah that's probably what
0:54:44
um one second this q16
0:54:53
application so that's the only two
0:54:56
options which we have
0:54:58
oh and that's that's exposed well that's
0:55:02
this one we're not doing this
0:55:04
authorization and stuff okay i'll
0:55:08
just add a star there yeah
0:55:12
at the end yep because i don't know what
0:55:15
this is but and for the origin as well
0:55:20
uh for the origin post
0:55:23
that was already there continue
0:55:27
right did you um just select postcard
0:55:31
yes yeah and did you select default 4xx
0:55:40
yes um by the way in the methods
0:55:43
uh i'll just call options
0:55:48
that's it and then in the allow methods
0:55:52
delete get head options patch posts and
0:55:57
you should be fine i guess yeah
0:56:04
have you clicked enable calls and
0:56:06
replace existing course headers
0:56:09
um i'm just thinking that she has got
0:56:13
the actions as in a separate lines as in
0:56:17
get and post we don't have that
0:56:20
so i'm just gonna create
0:56:24
create a method called post
0:56:28
yeah okay i should do the trick
0:56:32
post is there okay
0:56:36
and now i need to do
0:56:41
the name okay cool so i've got the post
0:56:46
there you manually created the post
0:56:54
lambda function proxy
0:57:01
okay i'll just share my screen now
0:57:09
how about a minute that was a good idea
0:57:12
we should have watched the video
0:57:16
um where did i wanted to go at the
0:57:23
this is what i've done
0:57:29
person i've come into post and it's
0:57:33
sorts of stuff and we have to
0:57:37
specify our lambda function there as
0:57:41
so i'm just gonna go and get the lambda
0:57:46
and from my small screen
0:57:54
and all i would need is a arn of it
0:58:06
think we're really close to making it
0:58:11
yeah all we are in the wrong
0:58:15
no we are we are pretty close excuse me
0:58:19
positive very confident positivity
0:58:22
we're all ahead to learn
0:58:29
okay so i've got the errand so i'm just
0:58:38
cool yeah that's the one and i'm gonna
0:58:43
save you're about to give permission
0:58:48
to ever get permission to walk yep i
0:58:53
that's brilliant no
0:58:56
you're you're braver than me saying i
0:59:00
whenever whenever a pop-up i don't
0:59:02
expect comes up i get scared
0:59:05
then i request everything i'm just done
0:59:13
yeah i use to do that but
0:59:16
experience comes a bit in handy
0:59:20
yeah i'll just press the right press the
0:59:29
so this is the post check that out
0:59:35
method request method response i think
0:59:39
where we want to be including the
0:59:43
isn't it i would have thought that um
0:59:45
automatically happens
0:59:47
if you if you do the action as was in
0:59:54
if you so just where it says resources
0:59:56
and there's a drop down box that says
0:59:58
actions there here
1:00:00
uh if you click that is there enable
1:00:02
calls enable calls
1:00:08
post yeah yeah true and then if you
1:00:11
click those two as
1:00:12
video did as well and those settings
1:00:14
should be fine and then
1:00:15
enable cause and replace existing cause
1:00:20
um and then that sounds promising
1:00:24
if you go to that uh post method
1:00:27
response again you should be there
1:00:30
is that yeah i'm i'm imagining this will
1:00:33
just do it for you in a way
1:00:37
fingers crossed okay that's something
1:00:41
yeah allow origin yeah
1:00:44
and this is the as well application dot
1:00:48
application slash station um so
1:00:51
shall we oh what else did it do in the
1:00:57
video classic can you watch again yep
1:01:04
you have a comment as well and um
1:01:08
where did you all go junior
1:01:12
first day i know andre
1:01:15
i'm really bad and that's why you're
1:01:24
class honors degree but um i went to
1:01:29
i did my bachelor's in the uk
1:01:33
nice yeah how about you brad and cough
1:01:36
uh karthik is still doing his bachelor's
1:01:40
i i um did my bachelor's
1:01:44
at rmit in melbourne oh i'm sitting at
1:01:48
nice yeah pretty cool
1:02:04
we basically need a um 200 meter
1:02:08
for this it's alright for this one
1:02:11
to the options method but anyway
1:02:27
course for this test as well
1:02:30
hang on a minute i'm gonna so
1:02:34
our our resource is that one so
1:02:37
we add course enable course for that
1:02:41
that post and that one as well
1:02:45
okay i've done that
1:02:48
still didn't get a 200.
1:02:55
added mine all right that's fine
1:03:02
now she went to options
1:03:05
um integration we just checked if it's
1:03:08
mock or not is it mock
1:03:11
uh is it mock integration hang on a
1:03:15
where did she go options here
1:03:21
i just clicked on options and it's still
1:03:24
going there yes it's mark
1:03:32
um the new little options wait
1:03:35
let's go back patient
1:03:39
also if you select the integration
1:03:41
response section of this method
1:03:43
you can see that the course headers are
1:03:46
similarly the course headers are added
1:03:48
to the get and post method
1:03:50
um now you need to go on indian options
1:03:55
and integration response yeah
1:03:59
and then to yeah they're added already
1:04:04
and wells see this one
1:04:23
continue to do that yep
1:04:26
continue to watch the video wow it's
1:04:36
again yeah i think you might have
1:04:38
stopped you are using a proxy
1:04:42
after you enable these settings and send
1:04:43
the required course headers
1:04:45
you can resolve the error while
1:04:46
accessing your api
1:04:48
thanks for watching okay deploy
1:04:52
uh i'll deploy it now and
1:04:55
hope for the best and plan for the worse
1:05:00
why am i doing this again for
1:05:07
third time's the jump yeah true
1:05:11
all right deploy there and prod
1:05:26
okay cool so this is our
1:05:30
endpoint i'm just gonna send it to you
1:05:34
just in case yep send it to me and you
1:05:57
yeah it shouldn't really make a
1:06:01
just for ocd purposes
1:06:04
yes okay it's always good to triple
1:06:16
and for ocd purposes i'll open this in
1:06:26
come on give me some loving now cause
1:06:30
give me some loving
1:06:34
no loving tonight actually go back
1:06:41
yep just want to check some in
1:06:49
okay that's fine um
1:06:59
no no no that wouldn't matter that would
1:07:03
don't worry bye yeah um
1:07:07
all right that's fine um they tried
1:07:11
um they're pretty close um
1:07:15
200 um response while we are enabling
1:07:24
we can just catch it off from here
1:07:34
session thanks a lot for coming bread
1:07:38
yeah no problem thanks for having me
1:07:40
making it a lot more
1:07:42
fun than it is usually as well
1:07:47
that's all right there's plenty of fun
1:07:51
it's good to see the the scrambler
1:08:03
join tomorrow brad
1:08:07
unfortunately i have plans but yeah
1:08:10
um that's we'll arrange another time and
1:08:14
cool yes sounds good but yeah guys
1:08:18
thanks a lot um andre for as in
1:08:21
helping us and pointing us in the right
1:08:24
um i'm pretty sure when nearly there is
1:08:28
just some few bits and bars tweaking
1:08:30
required and then it will work
1:08:33
um yeah if you want to add
1:08:36
anything else cottage and bread feel
1:08:41
yeah um all good um yeah thanks andre
1:08:45
the guidance and thanks viewers for
1:08:48
joining us and we'll see you soon brad i
1:08:51
really soon yeah yeah of course sounds
1:08:56
have a good night guys and see you
1:08:59
tomorrow's same time same place and same
1:09:04
all right see ya bye