Update to the commits.md, more details about how to use the --form method for creating a commit
What does this MR do?
It gives a bit more insight into committing files using the API. Especially commit files using the --form
parameter and using files from the local file system. Its also for people who rather use the --form
then JSON for possible environment restricted issues or one-liner commands.
Also most of the Gitlab API uses the --form
method but an example of it for the commit API was missing, so now there is also an alternative --form
method documented that people can use if they want.
The reasoning behind this addition was that the API describe the JSON body, but from my experience(and therefore the reason for the addition) is that I was not able to send a JSON body properly when the content
of an action
was also in JSON format.
And files of certain sizes were also problematic to send. The only way it worked was using the --form
with <
. The @
that is described in the previous URL also didnt seem to work, either the API complained that it content
was in wrong format or when using it with Base64 the file got half way corrupted...
What are the relevant issue numbers?
N/A
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer