Open gakuzzzz opened 9 years ago
If I remember correctly, for body param types, we expect you to just send one + we don't it validate it. I don't think this was made clear in the documentation though.
The reasoning was:
I'm not sure if we have re-thought the above, but I would suggest the following course of action:
We can not call HTTP Post API.
If you can not call the HTTP Post API, that is a different problem; it should still work. Maybe more details are needed.
Ok, I see. ParamType.Body is used any format as XML, JSON and so on.
I can not find the way how to setting HTTP Post API
parameters.
Other ParamType s (Query, Path, Header, Cookie) do not seem usable to POST body.
How I do configure?
Right, it looks like currently your best shot is to prepare a post body client side and send it as a body parameter. This prevents you from validating parameters in Octoparts which is a bit of a waste ... I think this design miss was because we focused on REST.
I see. I understood that Octoparts behave as proxy so it bit difficult to parse and validate body.
I think, It is enough that Octoparts client and Admin console is possible to build body from some parameters. Octoparts server still does not parse and validate body. And these parameters can not be used at cache control key.
What do you think?
I think that seems reasonable.
That said, to make this useful, we should make sure that the feature works across common body types; unless if there's a more scientific way, we should probably make sure the ones that Play supports can be built.
Namely:
I agree that the feature works across common body types.
It seems that ParamType.Body parameters's
outputName
is not used.https://github.com/m3dev/octoparts/blob/1a12031bea4b7e5b25814a225094cd61f175998f/app/com/m3/octoparts/aggregator/handler/HttpPartRequestHandler.scala#L80-L82
HTTP POST parameters require
key1=value1&key2=value2
format. HoweverHttpPartRequestHandler#createBlockingHttpRetrieve
use one first parameter and only value.We can not call HTTP Post API.