Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

guzzlehttp form data

$response = $client->request('POST', 'http://www.example.com/files/post', [
    'multipart' => [
        [
            'name'     => 'file_name',
            'contents' => fopen('/path/to/file', 'r')
        ],
        [
            'name'     => 'csv_header',
            'contents' => 'First Name, Last Name, Username',
            'filename' => 'csv_header.csv'
        ]
    ]
]);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #guzzlehttp #form #data
ADD COMMENT
Topic
Name
8+2 =