If I'm writing something that will  maybe run 2 or 3 times, and is less than 10 lines of code, I might use a .mac.  For anything more than that, I would use a class, as the time saved in setup is pretty negligible compared to the rest of the work done

Hi Jay


This has happened a few times, and I've readded them a few times.  I'll see if I still have the images handy and get them reattached again

Could you try making the call with a REST client like RESTLet for Chrome, and seeing if the request comes through on that method?

Try reading the Request data with this

Set updateJSON = %request.Content.Read()

Edited because I missed that you already tried this?

Hi Wendy,

I would need to see some details of what your class is doing to comment further.  

So I think you're encoding it as an Authorization Header?  

In that case, you can extract this from

set Auth = %request.GetCgiEnv("HTTP_AUTHORIZATION")

then process this however you need to (for example if you have something like "Basic 123908109abc", this will unpack it and decode the Base64)

 set AuthType = $P(Auth," ",1)
  set AuthString = $P(Auth," ",2)
    set DecodeAuthString = $SYSTEM.Encryption.Base64Decode(AuthString)
    set userid = $p(DecodeAuthString,":",1)
    set token  = $p(DecodeAuthString,":",2)

 

HI Soufiane

I'd need more info about the format of the data and how you are sending it to comment any further

If you're iterating that would typically be done with a CURSOR.  Each fetch cycle would pop the new state of the variables in, in line with each row (make sure you check for SQLCODE while doing this, to determine if there is a row to fetch).

More documentation on this is at

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

EDIT:

Mixed my dynamic SQL methods there.  You would use rset.%Next to do this iteration in %SQL.Statement, but the general theory still holds

http://localhost:57773/csp/docbook/DocBook.UI.Page.cls?KEY=GSQL_dynsql#G...

HI Rui

Unicode 0x3 is the ETX character, which can be used as newline in certain text editors.  Any control chars are disallowed in XML processing, so these should be stripped from whatever query you are using to drive this report

HTH

Chris