---
title: "Difference between GET and POST"
subject: "Web Technology"
chapter: 2
key: "semester_7/web_technology:get-vs-post"
source: https://www.bctengineer.com/q/semester_7/web_technology/get-vs-post
site: BCT Engineering
---

# Difference between GET and POST

Web Technology · Chapter 2: Web basics

- Asked in: 2076 Chaitra, 5 marks
- Video: [Difference Between GET & POST Method || GET Vs POST || Web Technology ||](https://www.youtube.com/watch?v=0kWxROrpXMA) — Awesome Code
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/web_technology/get-vs-post
- Whole chapter: https://www.bctengineer.com/md/semester_7/web_technology/chapter-2

## Question

What is the difference between GET and POST request?

## Short answer

GET retrieves data with parameters in the URL; it can be cached, bookmarked, and is limited in size and less secure. POST sends data in the request body for processing, has no practical size limit, supports binary, and is normally not cached. Use GET for searches and POST for logins or uploads.

## Answer

**GET** and **POST** are HTTP request methods. GET asks the server to *retrieve* a resource; POST *sends data* to the server to be processed (create or update).

| Basis | GET | POST |
|---|---|---|
| Purpose | Retrieve data | Submit data for processing |
| Data location | In the URL query string (`?name=ram&age=20`) | In the HTTP request body |
| Visibility | Visible in the address bar and history | Not shown in the URL |
| Security | Less secure; do not send passwords | More secure (still needs HTTPS for real protection) |
| Data size | Limited by URL length (about 2000 chars) | No practical limit |
| Data type | Only ASCII text | Text and binary (file upload, `multipart/form-data`) |
| Caching | Can be cached | Normally not cached |
| Bookmarking | Can be bookmarked | Cannot be bookmarked |
| Idempotent | Yes; repeating gives the same result | No; repeating may create duplicates |
| Back/refresh | Harmless | Browser warns about resubmission |

Example:
```html
<form method="get" action="search.php">...</form>   <!-- search.php?q=web -->
<form method="post" action="login.php">...</form>   <!-- data in body -->
```
Use GET for searches and filters; use POST for logins, registration forms and file uploads.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Where is data sent in a GET request?
   A. In the request body
   B. In cookies only
   C. In the response
   D. In the URL query string
   Answer: D. GET puts data in the URL, e.g. ?name=ram&age=20. (Key point: Data location)

2. Which is true of repeating a request?
   A. GET is idempotent; repeating POST may create duplicates
   B. POST is idempotent; GET creates duplicates
   C. Both create duplicates
   D. Neither can be repeated
   Answer: A. GET retrieves, POST processes data and may change state. (Key point: Idempotence)

3. Which method should be used for a file upload?
   A. GET with query string
   B. POST with multipart/form-data
   C. GET with multipart/form-data
   D. Neither can upload
   Answer: B. GET carries only ASCII in the URL; POST carries binary data. (Key point: File upload)

4. Which is a suitable use for POST?
   A. Search filters
   B. Bookmarkable page links
   C. Login and registration forms
   D. Cached image requests
   Answer: C. POST suits sensitive data submission; GET suits searches and filters. (Key point: Appropriate use)

## Related in other subjects

- [Preliminary estimate: two-storied health post](https://www.bctengineer.com/question.md?key=semester_7%2Festimating_and_costing%3Aprelim-est-health-post) — Estimating and Costing, chapter 3
