Thanks, Olaf. You were right, payload param was getting passed as header. On 02-Feb-2018 1:21 pm, "Olaf Krueger" <m...@olafkrueger.net> wrote:
> Hi, > I am not sure but could it be that you've put your payload/data in the > header instead of the body of the request? Maybe you should share some > code... > > I've just copied and pasted an incomplete snippet of a HTTPSerrvice call > [1]. > > Hope this helps, > Olaf > > > [1] > service = new HTTPService(); > service.addEventListener(ResultEvent.RESULT, resultCallback); > service.addEventListener(FaultEvent.FAULT, faultCallback); > service.url = url; > > // Due to a bug in Flash, a HTTPService/URLRequest with a GET request will > // not properly send headers. We therefore use POST for this and *ALL* > // requests. > service.method = "POST"; > > service.resultFormat = "text"; > service.contentType = "application/json"; > service.headers["Authorization"] = "Bearer " + this.jwt; > service.headers["Content-Type"] = "application/json"; > > // The X-HTTP-Method-Override header tells the API to treat this request > // as the passed request, even though it is being conducted as a POST (due > to the bug > // mentioned above) > service.headers["X-HTTP-Method-Override"] = method; > > var body:Object = new Object; > body.foo= "foo"; > body.bar= "bar"; > > service.send(JSON.stringify(body)); > > > > -- > Sent from: http://apache-flex-users.2333346.n4.nabble.com/ >