Petals BC REST

Add a parameter to define the nature of the REST response body content

Details

  • Type: Improvement Request Improvement Request
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.1-BC
  • Fix Version/s: 1.1.0-BC
  • Component/s: Provider mode
  • Security Level: Public
  • Description:
    Hide

    In provider mode, Petals BC Rest uses the content-type of the REST response to auto-detect which kind of type is the HTTP body: XML, JSON or attachment. In few cases, the content-type is not correctly set. For example, it can be set to application/octet-stream and the body contains JSON data. So, in this case, the auto-detection of the body content must be forced to JSON.

    We introduce an optional new parameter: response-body-as accepting values: json, xml, attachment and auto. By default, the auto-etection based on content-type is used.

    Show
    In provider mode, Petals BC Rest uses the content-type of the REST response to auto-detect which kind of type is the HTTP body: XML, JSON or attachment. In few cases, the content-type is not correctly set. For example, it can be set to application/octet-stream and the body contains JSON data. So, in this case, the auto-detection of the body content must be forced to JSON. We introduce an optional new parameter: response-body-as accepting values: json, xml, attachment and auto. By default, the auto-etection based on content-type is used.
  • Environment:
    -

Activity

Hide
Christophe DENEUX added a comment - Thu, 7 Sep 2017 - 12:30:52 +0200

Added in trunk

Show
Christophe DENEUX added a comment - Thu, 7 Sep 2017 - 12:30:52 +0200 Added in trunk

People

Dates

  • Created:
    Thu, 7 Sep 2017 - 10:32:38 +0200
    Updated:
    Thu, 7 Sep 2017 - 12:30:53 +0200
    Resolved:
    Thu, 7 Sep 2017 - 12:30:52 +0200