tracker issue : CF-4158293

select a category, or use search below
(searches all categories and all time range)
Title:

Content Type for POST requests with FORM Data needs to be "APPLICATION/X-WWW-FORM-URLENCODED"

| View in Tracker

Status/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

Listed in the version 2016.0.02.299200 Issues Fixed doc
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:

As Uday has fixed if, moving it to HF2
Comment by HariKrishna K.
2621 | May 27, 2016 05:41:13 AM GMT
test note
Comment by CFwatson U.
2622 | June 07, 2016 04:16:49 AM GMT
The fix for this bug is available as part of the early-access build for ColdFusion 2016 Update 2.
Comment by CFwatson U.
2623 | June 07, 2016 04:23:36 AM GMT