Forum Discussion

santanuray1983's avatar
santanuray1983
Frequent Visitor
8 years ago

JSON - "Mulpipart/Form-data" is giving no response.

JSON - Multipart/form-data is giving no response.

 

Raw - Request:

        

POST http://x.x.x.x:YYYY/registration/complete HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: multipart/form-data; boundary="----=_Part_0_1381003086.1460909327754"
MIME-Version: 1.0
Content-Length: 344
Host: x.x.x.x:YYYY
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)


------=_Part_0_1381003086.1460909327754
Content-Type: multipart/form-data
Content-Transfer-Encoding: 8bit

{"code":"7669","isAmity":true,"password":"pppassworD1#","phoneNumber":"+919989675459","user": {"dateOfBirth":"1981-08-10","firstName":"test1","lastName":"test", "email":"dev@gmail.com"}}
------=_Part_0_1381003086.1460909327754--

 

Response:

No response observed

 

When I select Media-Type as application/json then below response is observed

 

Raw Request:

 

POST http://x.x.x.x:YYYY/registration/complete HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/json
Content-Length: 186
Host: x.x.x.x:YYYY
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

{"code":"7669","isAmity":true,"password":"pppassworD1#","phoneNumber":"+919989675459","user": {"dateOfBirth":"1981-08-10","firstName":"test1","lastName":"test", "email":"dev@gmail.com"}}

 

 

Response:

 

 

{
"status": 500,
"message": "Exception occured. See errorList for details",
"additionalInfo": {},
"errorList": [ {
"errorCode": 500,
"errorMessage": "Internal server error. org.mule.api.expression.ExpressionRuntimeException: Execution of the expression \"json\" failed."
}]
}

 

 

I am able to get response by using "postman" tool with "form-data" and data 

 

Please reply. This is very urgent

No RepliesBe the first to reply