Hi Charles

> On 21 Aug 2015, at 16:07, Charles Warwick <char...@techstrategies.com.au> 
> wrote:
> 
> HI Peter,
> 
> I did some testing with Jacque and found that her LC7 was sending the wrong 
> content-type when posting to the PHP script.
> 
> In case anyone is interested:
> 
> It was using a content type of 'application/json’ which would have made sense 
> if the PHP script was written to accept the json data directly.
> 
> However, it was expecting the POST data to be encoded in name/value format: 
> variableA=valueA&variableB=valueB.
> 
> In this case, it required the json data stored in a variable called json:  
> i.e.  json=<json data>
> 
> Changing the headers as follows before the POST resolved the issue:
> 
>  set the httpHeaders to “content-type: application/x-www-form-urlencoded"
> 
> As I mentioned to Jacque, the json data itself needs to be urlEncoded.
> 
> Cheers,
> 
> Charles

Thanks for closing the loop. 

Cheers

Peter
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to