Skip to content

Commit a2dffb3

Browse files
committed
docs: improve sample code
1 parent ceb26a5 commit a2dffb3

File tree

1 file changed

+6
-4
lines changed
  • user_guide_src/source/libraries/curlrequest

1 file changed

+6
-4
lines changed
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22

3-
$post_data = [
4-
'foo' => 'bar',
5-
'userfile' => new \CURLFile('/path/to/file.txt'),
6-
];
3+
$client->request('POST', '/post', [
4+
'multipart' => [
5+
'foo' => 'bar',
6+
'userfile' => new \CURLFile('/path/to/file.txt'),
7+
],
8+
]);

0 commit comments

Comments
 (0)