Web Connection
insufficient stack space
Hi Rick,
loHTTP = CREATEOBJECT ('wwHTTP')
WITH loHTTP
.nConnectTimeOut = 30
.cHttpVerb = "POST"
.cContentType = "application/json"
.addheader("Authorization", "Bearer " + Mcle)
*.addheader("Content-Type", "application/json")
TEXT TO lcJSON TEXTMERGE NOSHOW PRETEXT 15
{
"name": "<<JUSTFNAME(Mfichier)>>",
"content": "<<STRCONV(FILETOSTR(Mfichier),13)>>",
}
ENDTEXT
.AddPostKey(lcJSON)
Mfichier is 187 KB
And I have the error message in the subject.
Something wrong ?
Thanks in advance,
Vincent
I must write .AddPostKey("", lcJSON)
Sorry for this useless message ...
Hmmm... you shouldn't need to write:
loHttp.AddPostKey("",lcJson)
This should work just the same - as long you set the content type (which you have).
loHttp.cContentType = "application/json"
loHttp.AddPostKey(lcJson)
wwHttp checks if the parm count < 2 and in that case automatically sets the key to ""
so effectively that code is exactly the same.
Just to be sure I tried your code and as you posted it and it works just fine.
I suspect the memory issue comes from the textmerge perhaps or some other unrelated memory pressure in your application.
+++ Rick ---