Open sprakasam opened 8 years ago
Think the problem is with your test.request.body
-- for application/x-www-form-urlencoded
, it should be in the format MyVariableOne=ValueOne&MyVariableTwo=ValueTwo
, using percent encoding [wikipedia, blog]. As an aside, usually sending binary files (PNG images) would be done more efficiently using multipart/form-data
encoding instead.
Hookup file... hilarious! Interweb dating site?
The server receives the url encoded form params as single entry with param "key" populated with whole thing mentioned for "test.request.body" in raml file and param "value" as empty string. Like,
key = {"id": "...", "imageType": "...", "imageBase64Encoded": "..."}, value = ""
Note: I don't have any problem with RAML file.
Hookup file: hooks.before('POST /v1/foo -> 200', function (test, done) {
}