Piot Sesi 07. Iot Protocols-Http

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 16

IOT PROTOCOLS-

HTTP
HTTP STANDARD PROTOCOL
IETF standard (RFC 2616 is HTTP/1.1)
Architecture: Client/Server, request/response
HTTP is ASCII based
HTTP IMPLEMENTATION
client more complex (ASCII parser)
more bytes to pay on data transfer
connection oriented via TCP
Data transport : Content-Type based on MIME
(Multipurpose Internet Mail Extensions)
HTTP IMPLEMENTATION
When a user submits a browser request to a web server, it sends
two categories of data:
 Form Data: Data that the user explicitly typed into an HTML form.
 For example: registration information.
 HTTP Request Header Data: Data that is automatically appended to the HTTP Request
from the client.
 For example: cookies, browser type, etc,
HTTP IMPLEMENTATION

Each resource is identified by a Uniform Resource Locator (URL)/ Uniform Resource


Identifier (URI)

HTTP IMPLEMENTATION
Method:
GET  to request a resource from the corresponding server
PUT  upload content
DELETE  delete content
POST  send data to a resource on the server
COMUNICATION PATTERN
TELEMETRY
INQUIRY
COMMAND
NOTIFICATION
HTTP 1.0 VS HTTP 1.1
HTTP 1.0 membuka satu koneksi untuk
tiap permintaan satu UTI (non persistent)
HTTP/1.1 dapat menggunakan
sebuah koneksi TCP untuk beberapa permintaan URI
(persistent) (dengan header
Connection : keep-Alive)
METHODS - GET
GET method requests transfer of a current selected
representation for the target resource.
/test/demo_form.php?name1=value1&name2=value2
GET requests can be cached
GET requests remain in the browser history
GET requests can be bookmarked
GET requests should never be used when dealing with sensitive data
GET requests have length restrictions
GET requests should be used only to retrieve data
METHODS - POST
 POST method requests that the target resource process the
representation enclosed in the request according to the resource’s
own specific semantics.
POST requests are never cached
POST requests do not remain in the browser history
POST requests cannot be bookmarked
POST requests have no restrictions on data length
METHODS - POST
 POST method requests that the target resource process the
representation enclosed in the request according to the resource’s
own specific semantics.
POST requests are never cached
POST requests do not remain in the browser history
POST requests cannot be bookmarked
POST requests have no restrictions on data length
END

You might also like