/$query shall allow Content-Type: application/json

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major
    • V4.02
    • Affects Version/s: V4.01_OS
    • Component/s: URL Conventions
    • None
    • Hide

      See description

      Note: this would allow providing "literal" values to non-binding function parameters of type Edm.Stream introduced by ODATA-1481 because there's now a natural way to provide the content-type in addition to the stream data:

      {
        "Thumbnail@mediaContentType": "image/jpeg",
        "Thumbnail": "...base64url encoded value...",
      }
      
      Show
      See description Note: this would allow providing "literal" values to non-binding function parameters of type Edm.Stream introduced by ODATA-1481 because there's now a natural way to provide the content-type in addition to the stream data: { "Thumbnail@mediaContentType" : "image/jpeg" , "Thumbnail" : "...base64url encoded value..." , }

      JSON as content type should also be supported by /$query:

      POST ~/$query
      Content-Type: application/json
      
      {"$filter": "a eq 1",
       "$select": "b"}
      

      This is especially useful for complex function parameters, that would then be represented as if they were action parameters:

      POST ~/Countries('DE')/GetPostcodes
      Content-Type: application/json
      
      {"$filter": "ValidityStart gt 2020-01-01",
       "City": "Heidelberg",
       "Address": {"Street": "Hauptstraße", "Number": "1"}}
      

      Note that

      • the name of the bound function in the URL is without parentheses (because the parameters are in the body)
      • all parameter values in the JSON payload must be literals (whereas in the URL they could be aliases that evaluate to arbitrary expressions)
      • the /$query segment in the URL is optional and has been omitted here. (There is no risk of misinterpreting a function invocation URL.)

            Assignee:
            heiko.theissen
            Reporter:
            heiko.theissen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: