Documentation / Tutorials / Quick Samples
Calling API in Awesome Enterprise
/ Quick Samples / Calling API in Awesome Enterprise
This sample just shows you how to do HTTP AUTH in the awesome enterprise
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
[php.base64_encode p1="easyengine:mfUIzTzi" o.set='template.base64pass' /] [template.set_array opts] [http] [method]GET[/method] [header]Authorization: Basic [env.get template.base64pass /][/header] [/http] [/template.set_array] [php.stream_context_create p1={template.opts} o.set='template.context' /] [env.echo template.opts /] [template.set pass='ABhiD6G2afffffK5gy#dN' /] [php.file_get_contents p1='https:/wordpoets.com/plot/modules/api?username=xyz&password={{template.get pass m.url_encode=yes}}&force_single_access=yes' p2=0 p3={template.context} o.set='template.contents'/] [env.echo template.contents /] |