S
S
sergey_fs2017-10-25 17:02:59
FreeSWITCH
sergey_fs, 2017-10-25 17:02:59

How to send header -H "Authorization?

There is a request like
curl -X POST -d "callrefid=&fromnumber=
&tonumber=" -H "Authorization: Zoho-oauthtoken
1000.c4bc04089aef36cab0d01c672be67723.20119609a95474ee74ef77c17224ebd1"
https://www.zohoapis.com/crm/call.bridge/phone .How
to send it to LUA
local curl_data_in_call="'callrefid="..userid.."&fromnumber="..fromnumber.."&tonumber="..tonumber.."'" --- what I send
session:execute( "curl", " https://www.zohoapis.com/crm/v2/phonebridge/callre... content-type application/json post "..curl_data_in_call)
using lua module on friswitch

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kiriharu, 2019-12-26
@kiriharu

Or maybe it's easier to use LuaSocket and http in it?

local http = require("socket.http")

local body, code, headers, status = http.request{ 
    url = "урл", 
    headers = {"ваши хедеры"}
}

print(code)
print(body)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question