Hello and welcome to the Golang programming languages course in the previous session, we talked about
rest, API and indecision.
You want to talk about the other concept?
API endpoints.
This is what API endpoints look like, STPs, Colin, yes, let's get this w w w dot soft dot com slash
go lang S3's go ask the search question mark w equals http and type equals commerce.
This you it can be broken into this past that you can see in the below table protocol how the browser
or client should communicate with the server subdomain subdivision of the main domain domain.
Unique Marie-France to identify web site on the Internet Port Port on the server the application is
running on by default is eight, so most cases we don't see it.
Pat Pat parameters in the rest API represent resources.
Query queries are key value pairs of information used mostly for filtering purposes headers.
This was not part of the union itself, but Heather is a part of network components sent by the client
or the server based on who sends it.
There are two kinds of header request header and response header.
Body, you can add extra information to both the request to the server and the response from the server.
The response time, usually, Jason, or similar now a days, it's mostly Jason.
Rest API with go blank, if you're writing this API, why should you choose go like it's compiled?
So you get a small miners?
It's fast.
Slower dance C or C++ or ROS, but faster than most other programming languages.
It is simple to understand, and it works really well in the microservices world for a reason number
one in this training course to implement restful API in the go programming language.
We use the guerrilla marks tools.
Guerrilla Mass Guerrilla is a web toolkit for the go programming language, and guerrilla marks is a
powerful you are a Rotarian dispatcher package.
Guerrilla Mox implements the reckless rotor and dispatcher for matching incoming requests to their respective
handler.
HDTV package built in metals are grids.
We can ride a server with no external libraries, but knit in HTP package has limitations.
This is a very popular library that works very well in my package and helps us to feel less do something
that is a related API.
There is no direct way to handle pet parameters, just like Rick was metals.
We have to handle packing query parameters manner.
Gorilla Mods is a very popular library that works really well and helps us a few things that makes API
building a breeze.
The name Marks's stands for entity to request multiple search.
Installation Guerrilla Marks Ron, go get pointing to a package, for example, for in sol guerrilla
marks.
Run below command in turn.
The main feature for.
It implements the type of handler interface, so it is compatible with the standard S2 to be served,
mocks requests can be matched based on your host pad.
Pat Perfect's Eskimos hearing query values, estimates or using cost emitters you are of costs.
Pass in query values can have variables with an optional regular expression.
Registered users can be billed or reserved, which helps maintaining references to resources and roads
can be used as supporters.
This dirt roads are only test if the patterns road matches.
It is useful to define groups of roads that are common conditions like a horse, a passport, office
or other repeated attributes.
As a bonus, this optimize request matching in order not to prolong the time of decision.
We will finish it and we will continue the campaign in the next session.
Goodbye.