Skip to content
Readerstacks logo Readerstacks
  • Home
  • Softwares
  • Angular
  • Php
  • Laravel
  • Flutter
Readerstacks logo
Readerstacks

How many type of methods in Restful api?

Aman Jain, August 28, 2021February 22, 2024

Restful api is very useful today while creating a mobile application or web application.

Restful api or Http request methods

There is 4 types of method of http request.

  1. Post
  2. Get
  3. Put
  4. Delete
  5. Patch
1. Post method

Post method is widely used to fetch the content of a form or uploaded file from client browser.

In php we get fetch data

<?php 
$_POST


POST /save/1
{
    "title": "skwee357",             // New 
    "email": "test@gmail.com"       // new email address
}
2. GET method

Get method is used the fetch the query string from url or from a form but form should be small.

In php example

<?php 
$_GET

GET /save?title=test
 
3. PUT method

Put method is used when we are updating the form or resource but it includes all entity(fields) to update.

PUT /save/1
{
    "title": "skwee357",
    "email": "test@gmail.com"       // new email address
}
4. DELETE method

Delete method is used to delete the componenet

PUT /delete/1
 
5. PATCH method

Patch method is used for update the existing data or resource but it is used when we are updating single field not all.

PACTH /save/1
{
    "title": "skwee357",
}

Related

Softwares Javascript Php

Post navigation

Previous post
Next post

Related Posts

Php laravel multiple where condition in eloquent

How to use laravel multiple where condition with example ?

March 5, 2022November 8, 2023

In this article i will show you to use laravel multiple where condition in eloquent. In laravel we can create multiple where condition in several ways like using the array of array, associative column and value and using multiple where clause. Sometimes we wanted to use multiple and condition or…

Read More
Php How to Use hasOne Relationship in Laravel

How to Use hasOne Relationship in Laravel with Example ?

February 27, 2022October 4, 2022

hasOne relationship in laravel is used to create the relation between two tables. hasOne means create the relation one to one. For example if a article has comments and we wanted to get one comment with the article details then we can use hasOne relationship or a user can have…

Read More
Javascript Password and confirm password validation in angular

Password and confirm password validation in angular ?

September 11, 2021November 9, 2023

Angular provides built-in library for validation but it doesn’t have built in validation for Password and confirm password validation in angular. so in this tutorial i am going to explain how can we make custom validation for this same as angular built-in validations. Confirm password most useful utility when we…

Read More

Aman Jain
Aman Jain

With years of hands-on experience in the realm of web and mobile development, they have honed their skills in various technologies, including Laravel, PHP CodeIgniter, mobile app development, web app development, Flutter, React, JavaScript, Angular, Devops and so much more. Their proficiency extends to building robust REST APIs, AWS Code scaling, and optimization, ensuring that your applications run seamlessly on the cloud.

Categories

  • Angular
  • CSS
  • Dart
  • Devops
  • Flutter
  • HTML
  • Javascript
  • jQuery
  • Laravel
  • Laravel 10
  • Laravel 11
  • Laravel 9
  • Mysql
  • Php
  • Softwares
  • Ubuntu
  • Uncategorized

Archives

  • August 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • October 2024
  • July 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • July 2023
  • March 2023
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021

Recent Posts

  • Understanding High Vulnerabilities: A Closer Look at the Week of July 14, 2025
  • Exploring Fresh Resources for Web Designers and Developers
  • The Intersection of Security and Technology: Understanding Vulnerabilities
  • Mapping Together: The Vibrant Spirit of OpenStreetMap Japan
  • Understanding High Vulnerabilities: A Deep Dive into the Weekly Summary
©2023 Readerstacks | Design and Developed by Readerstacks
Go to mobile version