[go: up one dir, main page]

0% found this document useful (0 votes)
20 views5 pages

Capter-6 Httpstructure

The document outlines the structure of HTTP requests and responses, highlighting key elements such as HTTP methods, URLs, form data, status codes, content types, and actual data. It emphasizes the importance of HTTP methods in web service testing and introduces the Fiddler tool for debugging web applications by capturing network traffic. The document also provides examples of static and dynamic web resource URLs and various HTTP status codes with their descriptions.

Uploaded by

naveensr4342
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views5 pages

Capter-6 Httpstructure

The document outlines the structure of HTTP requests and responses, highlighting key elements such as HTTP methods, URLs, form data, status codes, content types, and actual data. It emphasizes the importance of HTTP methods in web service testing and introduces the Fiddler tool for debugging web applications by capturing network traffic. The document also provides examples of static and dynamic web resource URLs and various HTTP status codes with their descriptions.

Uploaded by

naveensr4342
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Http Structure:

• Http protocol also as structure and its consists of header &


body part separated by empty line
• In order the view the http request & response structure we go
for Fiddler tool (developer debug tool)

Key Elements of Http-request & Http-response


Http method:
• It is a mandatory information present in the header of the http
Request
• http method is the first element in the http request, used to
specify the type of the request which is sent by client(Browser)
to Server(Application)
• http-1.0 has 3 methods, but in http-1.1 five more methods got
introduced
 Get  get resource from the server
 Post  create resource inside the server
 Put  complete update resource inside the server
 Patch  partial update the update resource inside the server
 Delete  delete the existing resource inside the server
 Trace
 Option
 Head
 Connect

Note: First http methods play major role in Web Service testing

WebURL:
• Mandatory information in header of the request
• It’s used to identify the specific web Resource inside the web
application
• Static Web Resource URL:
http://<domainName: port>/appName/staticResoursePath
• Dynamic Web Resource URL:
http://<domainName: Port>/dynamicResousePath/UrlPattern
EG:
http://localhost:8888/index.php
http://google.com/search?q=iphone11
http://172.217.160.142/search?q=iphone11

Form data:
• Data collected using htmlForm is called form data or data
collected from browser to server
• Size of the form will vary form to form
• Get request -> will not have form data
• Post request-> will have form data

Status Code:
• It is a mandatory information present in header of the
response.
• Status code represent the status of the http request
EG
Status Code Description

100 Continue

200 Server successfully the handled


the request

300 Re direction request

400 Client side error(requested


resource not found at server
side)

500 Server side error(Server


encounter an unexpected
condition)

Content type:

• It’s an optional information present in the response header,


Used the specify the content of the data present in the
response body
• It’s an optional information present in the request header &
used to specify the content of the data present in the request
body
• Every file will have dedicated contentType (MimeType)
EG :
application/json : .json
application/xml : .xml
application/zip : .zip
image/png :.png
……

Actual data:
• It’s an optional information present in the response body
• Actual data responded by server to browser , if in case request
is successful. otherwise server provides error message in the
body of the request

Fiddler Tool [API debugging tool ]

• The Fiddler tool helps you debug web applications by


capturing network traffic between the Internet and test
computers. The tool enables you to inspect incoming and
outgoing data to monitor and modify requests and responses
before the browser receives them.
• It is a debugging tool where we can view http request and
response data/property.
Download from
https://www.telerik.com/download/fiddler/fiddler4

You might also like