the first trigger option that we will look at will be the http trigger
actual function with an http trigger is involved when on http request is sent to the function standpoint.
Let's go to Azure Management Porto and create the function
in national management port. Um, I will go to my function app
and then I will select the functions
and click on new function
for http trigger function. You select http True girl
provide a little bit more useful name here. I will say http trigger
and I will put the authorization level for on animals for now
and I will click on the create bottom
In just a minute, the function will be created and you have the opportunity to edit the court
from within the portal.
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
the function is pretty built for you and it gives you a very simple example.
What the function versus accepts the http request looks for a query name.
Ah, query String parameter with the name name and returns that back.
You can test the function from within the Porto by clicking on the home button.
And as you can see, it sends the request and provides the output
and also gives you a lot of information.
You can also test your function
using Curl or any other Ah
for example Postman, I will try with Curro. I'll copy the u. N L
and I will say could Oh,
As you can see in this particular case because I didn't pass the name Query String para meta, I'm getting an error.
Let's pass the part of matter
and we need to put this in
And now you see that the function returns. Hello, My name.
Now let's go back to our
function and do some modifications there.
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
for bees. Http request
So what we gonna do? It's way Will are at a little coat to read the agent.
So this is the request together Starting user agent. And we'll print that one and will say agent here.
So if you're safe and run,
you will see that it comes back with Mozilla five for us our agent We can do the same thing from coral
and it will return us Hello, Coral
and devotion of the curl client.
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
because you just need to write the implementation for your logic
and you have everything that you need
as you can see implementing actual functions with http TP triggers is very easy.
You can use those to implement AP eyes or simple weapon plicating sins.
Now let's look at the other options for three getting functions