2

Having the following UrlMap:

<Routes>
   <Route Url="/SaveSomething" Method="POST" Call="Save"/>
</Routes>

What is the best (easiest?) way to read full request body, without string length limitations ($$$MaxStringLength) or anything that may cut off some data?

In my case the purpose of this is to place the contents into a global.

ZitRo
  • 1,163
  • 15
  • 24

1 Answers1

2

Something like that would work:

// %request.Content is a %CSP.BinaryStream
set ^global = ""
while '%request.Content.AtEnd {
   set ^global = ^global _ %request.Content.Read($$$MaxStringLength)
}

About %request

rfg
  • 1,331
  • 1
  • 8
  • 24