From 9207b5badcdfd760c9e6dc89f04a8b44cac380c3 Mon Sep 17 00:00:00 2001 From: Jonathan Nutter Date: Fri, 10 Mar 2017 23:45:15 -0800 Subject: [PATCH] add PATCH verb to available methods --- src/constants/http-methods.js | 1 + src/middleware/query.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/constants/http-methods.js b/src/constants/http-methods.js index cd455477..eb0e3150 100644 --- a/src/constants/http-methods.js +++ b/src/constants/http-methods.js @@ -3,3 +3,4 @@ export const GET = 'GET'; export const HEAD = 'HEAD'; export const POST = 'POST'; export const PUT = 'PUT'; +export const PATCH = 'PATCH'; diff --git a/src/middleware/query.js b/src/middleware/query.js index ac337b3f..88e7b0b8 100644 --- a/src/middleware/query.js +++ b/src/middleware/query.js @@ -31,6 +31,9 @@ const createRequest = (url, method) => { case httpMethods.PUT: request = superagent.put(url); break; + case httpMethods.PATCH: + request = superagent.patch(url); + break; case httpMethods.DELETE: request = superagent.del(url); break;