Skip to content

Update to the commits.md, more details about how to use the --form method for creating a commit

Jochum van der Ploeg requested to merge (removed):patch-48 into master

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?

Edited by Jochum van der Ploeg

Merge request reports