Search
 
SCRIPT & CODE EXAMPLE
 

PHP

guzzle post request with data

$response = $client->request('POST', 'http://httpbin.org/post', [
    'form_params' => [
        'field_name' => 'abc',
        'other_field' => '123',
        'nested_field' => [
            'nested' => 'hello'
        ]
    ]
]);
Comment

guzzle Request with POST files

$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'
        ]
    ]
]);
Comment

PREVIOUS NEXT
Code Example
Php :: css not working in live laravel project 
Php :: laravel collection pipe 
Php :: laravel upload base64 image 
Php :: remove gutenberg cpt 
Php :: how to send html table in email body in php 
Php :: in_array php 
Php :: how can set defult value for yield in laravel 
Php :: wp get attachment id 
Php :: laravel break 
Php :: str_shuffle in php 
Php :: eloquent unique combination 
Php :: custom rule laravel validation 
Php :: write php online 
Php :: array intersect 
Php :: carbon check if date is greater 
Php :: notify multiple users laravel 
Php :: Laravel Model Create Artisan Commant 
Php :: php image resize 
Php :: show image laravel 
Php :: laravel pluck example 
Php :: laravel model sync 
Php :: difference between use and require in php 
Php :: is replace case sensitive php 
Php :: how to data save usigng request all laravel 
Php :: route group in laravel 
Php :: generate random string in php 
Php :: cakephp 4 change layout view in a method 
Php :: How to calculate the sum of values in a list PHP 
Php :: laravel request get parameter 
Php :: how to acces sql with php 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =