.
tuberboy opened this issue · 2 comments
tuberboy commented
.
hightman commented
if you use Request::addPostFile() to upload attachment, the request will be multipart/form-data.
… 在 2021年9月22日,19:18,Tuber Boy ***@***.***> 写道:
Try to add full uses guide and example. Plz show me example about multipart/formdata boundary post request. Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
hightman commented
?? You need not build request body manually, just call request API, such as Request::addPostField, Request::addPostFile. see https://github.com/hightman/httpclient#customize-request
… 在 2021年9月23日,18:12,Tuber Boy ***@***.***> 写道:
I am not clear about it.
how will i send post request? This code:
$eol = PHP_EOL;
$BOUNDARY = rand_string(16);
$BODY="";
$BODY .= '------WebKitFormBoundary'.$BOUNDARY.$eol;
$BODY .= 'Content-Disposition: form-data; name="user[username]"'.$eol.$eol;
$BODY .= $UN.$eol;
$BODY .= '------WebKitFormBoundary'.$BOUNDARY.$eol;
$BODY .= 'Content-Disposition: form-data; name="user[password]"'.$eol.$eol;
$BODY .= "Mahgtyu65@".$eol;
$BODY .= '------WebKitFormBoundary'.$BOUNDARY.$eol;
$BODY .= 'Content-Disposition: form-data; name="user[email]"'.$eol.$eol;
$BODY .= $Email.$eol;
$BODY .= '------WebKitFormBoundary'.$BOUNDARY.$eol;
$BODY .= 'Content-Disposition: form-data; name="funnel"'.$eol.$eol;
$BODY .= "standard".$eol;
$BODY .= '------WebKitFormBoundary'.$BOUNDARY.$eol;
$BODY .= 'Content-Disposition: form-data; name="guest_checkout_token"'.$eol.$eol;
$BODY .= "undefined".$eol;
$BODY .= '------WebKitFormBoundary'.$BOUNDARY.'--';
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.