Network Request in JSON

I made a request on POSTMAN as attached image. But I don’t know how can I convert it to corona. Anyone can help?

I usually make request like the following:

local PARAMS  = {}

PARAMS.body = “key1=a&key2=b”

network.request( ‘http://abc.com/test’ ‘POST’, call_back_function, PARAMS)

But it doesn’t work on the attached request.

local headers = { ["Content-Type"] = "application/json", ["Accept-Language"] = "en-US", ["X-API-KEY"] = "abcdef12345" } local sendInfo={ ["key1"]="a", ["key2"]="b", ["key3"]="c" } local url="http://yoururlhere.com" local params = {} params.headers = headers params.body = json.encode( sendInfo ) local pedidoNet=network.request( url, "POST", callFunction, params)

i use this kinda of code to request to database. in the server side i’ve a php that gets the fields and check the X-API-KEY.

local headers = { ["Content-Type"] = "application/json", ["Accept-Language"] = "en-US", ["X-API-KEY"] = "abcdef12345" } local sendInfo={ ["key1"]="a", ["key2"]="b", ["key3"]="c" } local url="http://yoururlhere.com" local params = {} params.headers = headers params.body = json.encode( sendInfo ) local pedidoNet=network.request( url, "POST", callFunction, params)

i use this kinda of code to request to database. in the server side i’ve a php that gets the fields and check the X-API-KEY.