Time
1 hour
Difficulty
Beginner
CEU/CPE
1

Video Transcription

00:01
the first trigger option that we will look at will be the http trigger
00:06
actual function with an http trigger is involved when on http request is sent to the function standpoint.
00:14
Let's go to Azure Management Porto and create the function
00:20
in national management port. Um, I will go to my function app
00:26
and then I will select the functions
00:30
and click on new function
00:32
for http trigger function. You select http True girl
00:38
and I will
00:39
provide a little bit more useful name here. I will say http trigger
00:44
Sai Buri example
00:48
and I will put the authorization level for on animals for now
00:55
and I will click on the create bottom
00:58
In just a minute, the function will be created and you have the opportunity to edit the court
01:04
from within the portal.
01:07
Of course, you have the options to develop your functions using visual studio V s court or other i d of your preference. However, for this course, I will be using Porto to do the modifications
01:21
house. You can see
01:23
the function is pretty built for you and it gives you a very simple example.
01:26
What the function versus accepts the http request looks for a query name.
01:34
Ah, query String parameter with the name name and returns that back.
01:40
You can test the function from within the Porto by clicking on the home button.
01:46
And as you can see, it sends the request and provides the output
01:51
and also gives you a lot of information.
01:53
You can also test your function
01:57
using Curl or any other Ah
02:00
http Client,
02:04
for example Postman, I will try with Curro. I'll copy the u. N L
02:09
and I will say could Oh,
02:13
do you at all?
02:16
As you can see in this particular case because I didn't pass the name Query String para meta, I'm getting an error.
02:23
Let's pass the part of matter
02:29
and we need to put this in
02:31
quote
02:36
Okay?
02:39
And now you see that the function returns. Hello, My name.
02:47
Now let's go back to our
02:50
function and do some modifications there.
02:54
As you remember, I told you that the triggers have their own data. In this particular case, the trigger is the HDP three gives. So you have access to the request
03:05
for bees. Http request
03:07
So what we gonna do? It's way Will are at a little coat to read the agent.
03:14
So this is the request together Starting user agent. And we'll print that one and will say agent here.
03:23
So if you're safe and run,
03:25
you will see that it comes back with Mozilla five for us our agent We can do the same thing from coral
03:36
and it will return us Hello, Coral
03:38
and devotion of the curl client.
03:43
So you have complete access to the request You can eat not only the headers, but you can eat any query string para matters as well so you can read the body and so on Using http triggered functions in national helps to develop a P eyes very easily
04:00
because you just need to write the implementation for your logic
04:04
and you have everything that you need
04:10
as you can see implementing actual functions with http TP triggers is very easy.
04:16
You can use those to implement AP eyes or simple weapon plicating sins.
04:21
Now let's look at the other options for three getting functions

Up Next

Azure Functions

This Azure Functions course explains the core concepts of serverless services in Azure, how to develop functions that use different triggers and how to secure access of Azure Functions and manage configuration secrets.

Instructed By

Instructor Profile Image
Toddy Mladenov
Instructor