Hi
I am calling the stripe api from the cloud code using the code below, the body is returned as a string, is there anyway I can decode that in the cloud api rather than sending it back to Corona and getting Corona to do it (which does work), basically I want to call json.decode on the body so I have the information in the cloud api.
The reason is I’m trying to do this is to minimize the backwards and forwards of many calls to the server.
local api\_key = "sk\_test\_1234567890" local description = "Test" local answer = coronium.user.getUser( in\_data.userid ) if not answer.error then local email = answer.result.email coronium.log( answer.result.email ) local newCustomer = "email="..email.."&description="..description local header = { ["Authorization"] ="Bearer "..api\_key, } local answer = coronium.network.request( 'https://api.stripe.com/v1/customers', newCustomer, 'POST', header ) coronium.log( type(answer.result.body) ) coronium.output( {result = answer.result.body} ) else coronium.output( answer ) end