Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagelua
-- The main function is the first function called from Iguana.
function main()
   local ApiToken = "5gBjjIjuys5K0S6ggg3u94A2"
   local BaseToken = filter.base64.enc("firstnamefirst.lastname@interfacewarelast@interfaceware.com:"..ApiToken)
   local Page = '2101313577'
   local BaseUrl = "https://interfaceware.atlassian.net/wiki/rest/api/";
   
   local Data, Code, Headers = net.http.get{ 
      url = BaseUrl..'content/'..Page,
      parameters={
         expand='body.view'
      }, 
      headers = {
         Accept="application/json",
         Authorization="Basic "..BaseToken
      },
      live = true
   }
   local J = json.parse{data=Data}
   trace(J.body.view.value)
end

...