-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add upload order document operation #112
Add upload order document operation #112
Conversation
- Add documentation - Simplify code
$requests[] = $link->createRequest( | ||
'POST', | ||
['operation' => $type], | ||
['order' => $chunk] | ||
Psr7\Utils::streamFor(new Psr7\MultipartStream($body)) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
y'aurait pas l'oubli du header ici justement ?
'Content-Type' => 'multipart/form-data',
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est volontaire, il est ajouté automatiquement par la librairie, ça ne fonctionne pas autrement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
j'arrive à voir qu'en dessous, tu gères potentiellement le application/json, mais le "multipart/form-data", il est mis par défaut du coup ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est ajouté automatiquement par Guzzle si le body est un MultipartStream. Je pourrai d'ailleurs enlever le streamFor(), il ne sert à rien. J'avais ajouté la possibilité de définir le header dans un 1er temps car je définissais à 'multipart/form-data'
au départ, mais ça ne fonctionne pas de faire comme ça.
Test fonctionnel ok |
Reason for this PR
Add upload order document operation
Out of scope
This PR contains some OOS :
How to test