Skip to main content

HTTP & HTTPS

What is HTTP?

HTTP stands for Hypertext Transfer Protocol.
It is a communications protocol and is used to send and receive web pages and files over the internet.
HTTP works by using a user agent (e.g. a browser) to connect to a server. The server must be located using a URL or URI. This always contains http:// at the start. It normally connects to port 80 on a computer.

What is HTTPS?

HTTPS stands for Hypertext Transfer Protocol Secure. This is a more secure version of HTTP and starts with https:// at the beginning of the URL. It encrypts all the information that is sent and received. This can stop malicious users such as hackers from stealing the information and is often used on payment websites. HTTPS uses port 443 for communication instead of port 80.


What is an HTTP Request?

HTTP stands for Hypertext Transfer Protocol and is a way of sending messages from one computer to another computer over the internet.
An HTTP request is sent to a specific URL and consists of a VERB, a set of HTTP Headers and a Body or Payload.
An example HTTP request is:
GET https://http://testingkida.blogspot.com// HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/plain
Host: testingkida.blogspot.com/
User-Agent: Apache-HttpClient/4.5.4 (Java/1.8.0_144)
Accept: text/html,application/xhtml+xml


URL

URL is a Uniform Resource Locator and is the address we use to access websites and web applications. URLs occur most commonly to reference web pages (http), but are also used for file transfer (ftp), email (mailto), and other applications.

Request Verbs

Request VERB specifies the type of request e.g. GET, POST, PUT, DELETE.
A Web Browser will usually make GET requests and POST requests, whereas when working with HTTP APIs the typical HTTP Verbs used are: GET, POST, PUT, DELETE.
GET request, as the name suggests, asks for a resource or to read information from the server e.g. clicking on a link. GET requests are visible in the browser’s address bar.
POST request, on the other hand, supply information to the server e.g. submitting a login or registration form. To create an entity, we would use POST requests. Also, POST requests are not visible in the browser’s address bar.
PUT request is used to update information on the server. For example, an existing user wishes to update his password, then a PUT request is used.
DELETE request deletes information on the server.
Both POST and PUT requests would usually have a request body. GET and DELETE would not.

Request Headers

Request headers specify information such as the type of Browser, type of content in the message, and what type of response is accepted in return.

Request Body / Payload

A Payload is the body of the HTTP request or response.
A request body can be plain text, HTML, XML, JSON, Javascript, or a set of key-value pairs as form-data.
When browsing the Web, the Browser usually receives an HTML payload. This is the web page that you see rendered in the Browser.
Typically when working with an HTTP API we will send and receive JSON or XML payloads.
Not all HTTP messages can have payloads: POST and PUT can have payloads, GET and DELETE can not.

What is an HTTP Response?

When a request is sent to a server, the server returns a response. The response from the server tells you if your request was successful, or if there was a problem.
An HTTP response method is made up of three components: Response status code, response headers, response body.

Response Status Codes

  • 2xx for Success, the most common one is 200 which means “OK”.
  • 3xx for Redirection, the most common ones are 301 and 303 which mean “Permanent Redirect” and “Redirect for Undefined Reason”, respectively.
  • 4xx for Application Error, the most common ones are 403 and 404 which mean “Forbidden” and “Not Found”, respectively.
  • 5xx for Server Error, the most common one is 500 which means “Server Error”.



Comments

Popular posts from this blog

Test Scenarios for Excel Export Functionality

1. The file should get exported in the proper file extension. 2. The file name for the exported Excel file should be as per the standards e.g. if the file name is using the timestamp, it should get replaced properly with an actual timestamp at the time of exporting the file. 3. Check for date format if exported Excel file contains the date columns. 4. Check number formatting for numeric or currency values. Formatting should be the same as shown on the page. 5. The exported file should have columns with proper column names. 6. Default page sorting should be carried in the exported file as well. 7. Excel file data should be formatted properly with header and footer text, date, page numbers etc. values for all pages. 8. Check if the data displayed on a page and exported Excel file is the same. 9. Check export functionality when pagination is enabled. 10. Check if export button is showing proper icon according to the exported file type E.g . Excel file icon for xls files 11.

Basic Introduction of RPA

  1) What is Robotic Process Automation? ·          Robotic process automation (RPA) is defined by the Institute for Robotic Process Automation (IRPA) as ‘the application of technology allowing employees in a company to configure computer software or a ‘robot’ to capture and interpret existing applications for processing a transaction, manipulating data, triggering responses and communicating with other digital systems.’ ·          RPA (Robotic Process Automation) Robotic Process Automation enables you with tools to create your own software robots to automate any business process. Your “bots” are configurable software set up to perform the tasks you assign and control. 2) What Can RPA Do? ·          RPA is software-based, it can be used to perform various tasks. These include maintenance of records, queries, calculations, and transactions. Additionally, any application commonly used by your company can be operated by RPA. ·          For example, Citrix, .NET, HTML,

Introduction to Apache JMeter

Apache JMeter is a great open source application with awesome testing abilities. Web Server is a platform which carries loads of numbers of applications and users, so that it is necessary to know that how does it works or performs means; how effective it is to handle simultaneous users or applications. For example; how the “Gmail” supporting server will perform when numbers of users simultaneous access the Gmail account – basically have to do performance testing using performance testing tools like JMeter, Loadrunner etc. To check the high performance of the application or server, do high performance testing using JMeter for exceptional results. Before understanding Overview of JMeter , let us have a look on three testing approach, Performance Test : This test provides the best possible performance of the system or application under a given configuration of infrastructure. Very fast, it also highlights the change need to be made before application goes into producti