-
Notifications
You must be signed in to change notification settings - Fork 60
Feature/add support for actions with arguments #336
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
base: develop
Are you sure you want to change the base?
Conversation
Also remove logging messages used for debugging
|
|
||
| if (ret_sig != 0) { | ||
| ret = GSTD_BAD_VALUE; | ||
| /* The return value is not required */ |
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.
You should document this. That the actions ignore the return values
| if (query != NULL) { | ||
| name = g_hash_table_lookup (query, "name"); | ||
| description_pipe = g_hash_table_lookup (query, "description"); |
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.
Have you evaluated if this breaks something? It seems that everything is now encapsulated into a JSON. I wonder if this is going to break something on the HTTP side. Have you checked the examples?
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.
Yes, I evaluated the examples using Postman and curl, with the current HTTP structure and using a JSON. For example:
curl --location 'http://127.0.0.1:3000/pipelines' --header 'Content-Type: application/json' --data '{"name": "p1", "description": "videotestsrc name=vts ! identity name=id ! autovideosink"}'
curl --location --request POST 'http://127.0.0.1:3000/pipelines?name=p0&description=videotestsrc%20name%3Dvts%20!%20identity%20name%3Did%20!%20autovideosink'4c72c41 to
0084c4b
Compare
| for (guint i = 0; i <= query.n_params; i++) | ||
| g_value_unset (&args[i]); |
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.
Braces
| if (!json_parser_load_from_data (parser, | ||
| msg->request_body->data, | ||
| msg->request_body->length, | ||
| &err)) { |
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.
Indentation is incorrect. You should use gst-indent
Support action signals with one or more arguments.
Support adding
nameanddescriptionto HTTP PUT and POST requests in the request body asapplication/jsontype