/$query shall allow Content-Type: application/x-www-form-urlencoded

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

      The request body MUST use the content-type text/plain or application/x-www-form-urlencoded.

      https://github.com/oasis-tcs/odata-specs/pull/170

      Show
      The request body MUST use the content-type text/plain or application/x-www-form-urlencoded . https://github.com/oasis-tcs/odata-specs/pull/170

      An HTML form can be used to have a browser navigate to the response of an OData request, especially if the response is a stream. If that OData request makes use of the /$query segment, it must have Content-Type: text/plain, which forces an HTML form like

      <form method="post" action="~/$query" enctype="text/plain">
       <input name="$filter" value="a%20eq%201&$select=b"/>
      </form>
      

      Much more natural would be if Content-Type: application/x-www-form-urlencoded were also allowed:

      <form method="post" action="~/$query"
        enctype="application/x-www-form-urlencoded">
       <input name="$filter" value="a eq 1"/>
       <input name="$select" value="b"/>
      </form>
      

      This leads to the same request body as above:

      $filter=a%20eq%201&$select=b
      

      but without forcing the client to percent-encode spaces and insert the ampersand.

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

              Created:
              Updated: