8. HTTP Request and Response in API || Understanding HTTP Request || Understanding HTTP Response
Krishna Sakinala Krishna Sakinala
18.5K subscribers
42,685 views
0

 Published On Jul 18, 2020

Please use the following link to install the Katalon Studio:

https://katalon.com/sign-up?getr=kris... Check Tubebuddy Features Here:
https://www.tubebuddy.com/krishnasaki... #HTTP #Request and #Response:
==========================

- HTTP -- HyperText Transfer Protocol
- The communication happens using Request and Response

Request in REST:
===============
- To make a valid Request, the client needs to include 4 things:
1. URL (Uniform Resource Locator)
2. Method
3. List of Headers
4. Body

URL:
===
URLs became an easy way for the client to tell the server which things it wants
to interact, called resources.

Method:
=======
The method request tells the server what kind of action the client wants the server
to take. The 4 most commonly used or seen in APIs are:
1. GET -- Asks the server to retrieve a resource
2. POST -- Asks the server to create a new resource
3. PUT -- Asks the server to edit/update an existing resource
4. DELETE -- Asks the server to delete a resource

Headers:
=======
Headers provide meta-information about a request.

Body:
====
The request body contains the data the clients wants to send the server.

Ex: URL -- http://website.com
Method -- POST
Headers -- user-agent
Body -- data

Response in REST:
================
The server response with a status code.
Status codes are 3 digit numbers

Ex: Status Code -- 200(OK)
Headers -- content-type:text
Body -- data

Data Formats:
============
A well-designed format is dictated by what makes the information the easiest for
the intended audience to understand.
The most common formats found APIs are
1. JSON
2. XML

JSON -- It is very simple format that has two pieces -- ‘Key’ and ‘Value’
Ex: {“name”:”api”}

XML -- It provides few building blocks.
The main block is called node.
XML always starts with root node, inside that will have child nodes.

How Data Formats are used in HTTP:
==================================
Using Headers we can inform the server what information we are sending to it and
what we are expecting in return.

Content:type : When the clients send the content-type its saying what format the
data is.
Accept: The Accept header tells the server what data-format it is able to accept.



Protractor with Javascript - https://bit.ly/2jZ5XkX
Selenium Java Tutorial - https://bit.ly/2keM2Pb
Jasmine Tutorial - https://bit.ly/2lv0m6l
Java - https://bit.ly/2lylSHq
TestNG Tutorial - https://bit.ly/2lTpB2d
PdfUtil - https://bit.ly/2keBDTA
Shutterbug - https://bit.ly/2lX6xQV
Selenium Realtime Examples - https://bit.ly/2k0FqDQ
Java Interview Questions - https://bit.ly/2kopsmY
Katalon Studio - https://bit.ly/2lWhyln
Database Testing - https://bit.ly/2ko4jcJ
Fillo Excel API - https://bit.ly/2jRyWqC
Ashot - https://bit.ly/2kqXk2y
Extent Reports Version 3 Java - https://bit.ly/2k0FweG
Robot class - https://bit.ly/2lshPfJ
Sikuli - https://bit.ly/2lTq2cR
Excel Read Write using Java - https://bit.ly/2lyXRj8
AutoIt - https://bit.ly/2lyIYgM
Extent Reports Version 2 C# - https://bit.ly/2kqIY2d
Extent Reports Version 2 Java - https://bit.ly/2k0XkGA

Facebook :   / automationtesting2016  
LinkedIn : https://www.linkedin.com/feed/?trk=hb...
Google+ : https://plus.google.com/1052863009260...
Twitter :   / krishnasakinala  
Website : http://automationtesting.in/

show more

Share/Embed