I was given a json file and it need to convert into a php curl but I don't have idea how to do it. can some enlighten me or guide me?
here is the json data given
"request": {
        "auth": {
            "type": "basic",
            "basic": [
                {
                    "key": "password",
                    "value": "",
                    "type": "string"
                },
                {
                    "key": "username",
                    "value": "",
                    "type": "string"
                }
            ]
        },
        "method": "PUT",
        "header": [
            {
                "key": "Content-Type",
                "name": "Content-Type",
                "value": "application/x-www-form-urlencoded",
                "type": "text"
            },
            {
                "key": "Authorization",
                "value": "Basic M6NDhhODhjYWUwY2Y0NDE",
                "type": "text",
                "disabled": true
            }
        ],
        "body": {
            "mode": "formdata",
            "formdata": [
                {
                    "key": "invoice",
                    "type": "file",
                    "src": "file.xml"
                },
                {
                    "key": "invoice",
                    "type": "file",
                    "src": [],
                    "disabled": true
                }
            ],
            "options": {
                "raw": {
                    "language": "xml"
                }
            }
        }
    }
and the requirements it to create a PUT request using PHP curl. I hope someone could help :)
I saw a sample here PHP cURL HTTP PUT but I don't know where to put the username and password credentials
 
    