-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kernelci.api: rework and enhance the api _post() method
Simplify the base case, document the method and make it capable of handling both string and dict payloads (automatically detected). The default and most frequent use case will still be to pass a dict to it, which will be sent to the server as a json object or as an encoded string, depending on the <json_data> parameter. The additional capability of accepting a string fits the use cases where we might have an already processed json definition to POST instead of a python dict. Signed-off-by: Ricardo Cañuelo <[email protected]>
- Loading branch information
1 parent
5d916a5
commit 6e8d6c5
Showing
1 changed file
with
40 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters