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

Sharing variables between all views in laravel 8

January 15, 2022January 15, 2022

In laravel its easy to share varible from controller to view using view function but sometimes we need to share some specific information to all pages of our website for examle sharing the site settings, user info etc. so in this case we require to share a varible across the…

Read More
Php How to Store Array in Database Laravel

How to Store Array in Database Laravel ?

July 29, 2022March 16, 2024

In this article we will learn to Store Array in Database Laravel. Sometime in our application we have some raw information which we only want to store in our database and later on wanted to show back again. These type of information or data is only used for to keep…

Read More
Php How to Move Files or Folder to One Folder to Another in Laravel

How to Move Files or Folder to One Folder to Another in Laravel ?

May 27, 2022

Move command is used to shift the folder or files from one location to another without copy so In this article i will show you move files or folder to one folder to another in Laravel. File System is used to perform the file system based operations like move files…

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

  • 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

  • Mapping Together: The Vibrant Spirit of OpenStreetMap Japan
  • Understanding High Vulnerabilities: A Deep Dive into the Weekly Summary
  • Building a Million-Dollar Brand: The Journey of Justin Jackson
  • Mastering Schedule Management with Laravel Zap
  • The Resilience of Nature: How Forests Recover After Fires
©2023 Readerstacks | Design and Developed by Readerstacks
Go to mobile version