How to use PATCH verb with curl

后端 未结 5 651
旧时难觅i
旧时难觅i 2020-12-04 18:54

I am trying to make a PATCH call to a server. I am using the following command:

curl --data status=closed -X PATCH https://api.viafoura.com/v2/dev.viafoura.         


        
5条回答
  •  情话喂你
    2020-12-04 19:32

    This is something which worked for me in my sample app.

    curl --data 'id=57&equipment_type_name=57 edited' -X PATCH http://localhost:5009/equipment-type/update
    
    {
      "info": "Equipment type updation.",
      "response": {
        "status": "success",
        "message": "updateEquipmentType",
        "result": {
          "data": [
            [
              {
                "update_status": 1
              }
            ],
            {
              "fieldCount": 0,
              "affectedRows": 0,
              "insertId": 0,
              "serverStatus": 2,
              "warningCount": 0,
              "message": "",
              "protocol41": true,
              "changedRows": 0
            }
          ]
        }
      }
    }
    

提交回复
热议问题