You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by "Rajat Khandelwal (JIRA)" <ji...@apache.org> on 2016/03/29 06:33:25 UTC
[jira] [Commented] (LENS-483) Consistent way of receiving request
data in REST APIs
[ https://issues.apache.org/jira/browse/LENS-483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15215400#comment-15215400 ]
Rajat Khandelwal commented on LENS-483:
---------------------------------------
There's still one place where sessionid is taken as form param, instead of url param, like everywhere else (POST on /queryapi/queries). I think we should change that too. So let's keep it open until a decision is made on that.
> Consistent way of receiving request data in REST APIs
> -----------------------------------------------------
>
> Key: LENS-483
> URL: https://issues.apache.org/jira/browse/LENS-483
> Project: Apache Lens
> Issue Type: Sub-task
> Components: server
> Reporter: Himanshu Gahlaut
> Assignee: Amareshwari Sriramadasu
> Fix For: 2.6
>
>
> Lets take example of createCube and createFact.
> createCube accepts LensSessionHandle as query param and XCube as entity.
> @POST
> @Path("cubes")
> public APIResult createNewCube(@QueryParam("sessionid") LensSessionHandle sessionid, XCube cube)
> On the other hand, createFact consumes multi part form data and accepts LensSessionHandle and XFactTable as form data params.
> @Consumes({MediaType.MULTIPART_FORM_DATA})
> @POST
> @Path("/facts")
> public APIResult createFactTable(@FormDataParam("sessionid") LensSessionHandle sessionid, @FormDataParam("fact") XFactTable fact)
> createFact and createCube are logically similar but still have different ways of receiving request data in REST API.
> Logically similar APIs should choose same method to receive request data.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)