Jun 01, 2017; 16:26
Alex Betz
requestheader
I am trying to pass a token in the request header of a curl request with no
success. Not quite sure what is wrong with my code:
local(req) = curl()
#req->url = 'https://httpbin.org/headers'
#req->contentType = 'application/json'
#req->set(CURLOPT_HEADER(), 1)
#req->set(CURLOPT_HTTPHEADER, array('Authorization' = 'Bearer
XXXXXXXXXXXXXXXX'))
#req->postFields = '{
"elements":[
{
"type":"Contact",
"id":"1",
"createdAt":"1403034086",
"depth":"minimal",
"name":"george.washington@america.com",
"updatedAt":"1410193024",
"emailAddress":"george.washington@america.com"
},
{
"type":"Contact",
"id":"2",
"createdAt":"1403113589",
"depth":"minimal",
"name":"john.a.macdonald@canada.com",
"updatedAt":"1403113589",
"emailAddress":"john.a.macdonald@canada.com"
}
],
"page":1,
"pageSize":2,
"total":527
}'
#req->raw
#req->close
Further, is this the correct way to submit a json file to a site? Any help
appreciated
Thanks
Alex
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso Lasso@lists.lassosoft.com
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>
Jun 01, 2017; 12:50
Steve Piercy - Website Builder
Re: requestheader