Title:
Content Type for POST requests with FORM Data needs to be "APPLICATION/X-WWW-FORM-URLENCODED"
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): / ext-user (Immanuel Noel)
Created: 05/27/2016
Components: API Manager, Publisher Portal
Versions: 2016
Failure Type: Non Functioning
Found In Build/Fixed In Build: 299044 /
Priority/Frequency: Major / Very few users will encounter
Locale/System: English / Linux All,Mac 10 All,Solaris All,Win XP All
Vote Count: 0
Problem:
When POST request type is used with FORM data, API Manager tryout adds "APPLICATION/X-FORM-URLENCODED" as the default consumes type.
Since ColdFusion requires the content-type to be "APPLICATION/X-WWW-FORM-URLENCODED", we must replace the former with the latter while creating / editing APIs from the Publisher Portal.
Content Types starting with "x-" are not accepted standards. ColdFusion accepts APPLICATION/X-WWW-FORM-URLENCODED.
Method:
Create REST API in ColdFusion with the attached files.
Import REST API in API Manager
Use Tryout
Result:
{
"Message": "The @FormParam is utilized when the content type of the request entity is not application/x-www-form-urlencoded"
}
Expected:
REST api result
Workaround:
Add APPLICATION/X-WWW-FORM-URLENCODED to consumes list manually.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4158293
External Customer Info:
External Company:
External Customer Name:
External Customer Email:
Attachments:
Comments: