Hello and welcome to this lecture.
In this lecture we'll be looking at how Ajax makes a request call to the server to make a request or
send the request to the server.
We have to use two methods that are part of the exe email hasty TTP request project.
The methods are open and sent.
So this will be how you send a request so it be it will be x.
T T P don't open and so what this does.
In between the parenthesis here you have to specify setting parameters here.
Prepartum if there's a first one.
Here's a get.
This is how you will send the information to the server Okay and then the second parameter here is see
how chawl text that you want to send and then this parameter.
Here you set it to true if you want the Wally to be a scene.
Chronos.
If you don't want it to be synchronous then you set it to false.
But most cases people say it is true because you wanted to be a sequence you don't want the web browser
to be held up.
Why the request is made.
So you want it to be a synchronous or when the request is made and the response comes back.
It updates what he needs to behind the scene so when you see him be open method you have to specify
the method first so there are two main methods with the open you got to get or the post so get or post.
Post is more secure.
So there are two methods with the open get off post and then here is see you are real or B.
This is a website.
This is where you specify the website you can send anything.
So in this case I'm sending a text so you would be text oil.
Could be a Website uriel this is where you specify it.
And in this program if Here is where you specify if you want it to be a synchronous.
You said that too true.
If you don't want it to be sintra Cosequin not she said this tool force had been on this line here.
This is how you sent it just.
TTP don't send so few use in they get method.
You will usually use the send to go with that.
However if you are send in a string.
2 December.
Dare you be using the post.
So if they data you're sending it has Trink you.
This is how you send it in between the Param if you type in a drink.
Ben you used the post method rather than to get method right.
If you're not using this treehaven are used in the post to get method is a lot simpler and faster than
the post metate.
So in most cases you can use the get method.
However if you are sending a large amount of data is best to use the pulls method because it has no
size limit.
So things like send use that input.
We can contain on known characters post is more robust and secure than get.
So if you look in out security then always use Post because it's more secured and always set his value
to to through.
If you want be a jar to be synchronous this must be true.
Has set it to force then it loses it's a synchronoss Nature.
Thank you so much for your time.
I hope the video has been useful.
So this is how you would make a Ajax request call to a web server.
He is in the dot open effort.
It contains this.
X x Haiti t.p contains two main method which is to get the post it gets simpler but not as secure as
post and there are signs limitations with Leopard whereas the post there's no restrictions.
It's a lot safer as well.
So if you are sending strings make sure you use most strings is also known as text.
And there you can enclose the string inside the practices.
If you are not send in a string then you don't need to put the value inside the offices.
Okay thank you so much and take care.
Bye for now.