Greetings,
    I must be missing something obvious here.  I'm using WEENYWEB as my pattern to create a webserver that receives and returns a JSON payload.  I'm using Postman for the POST and it is received fine. My main PIPE has various IMMCMDs in it, one of which triggers a pipestop.

    The problem is that when I send the POST, it all looks good until the 'var' in the second code segment. It hangs there until I issue the 'stop' immcmd.  At that point, I see the say at the bottom of the second code segment, but the socket has been closed so the reply can't be sent.

    I know it's got to be something simple and/or involving 'pipethink' which I'm not great at.  Any ideas?

Thanks,
DeWayne

PCALLWEB REXX - WEENYWEB REXX equivalent
<stuff in addpipe>
  '| tcpdata ',
  '| join * ',
  '| h: http ',
  '| hi: faninany ',
  '| change x0a x20 ',
  '| xlate from 819 to 500 ',
  '| w: pcserver',
  '| xlate from 500 to 819',
  '| insert x0d0a after',
  '| y: faninany',
  '| elastic',
  '| i:',
  '\ h:  ',
  '| hi: ',
  '\ fo: ',
  '| specs w3 1 ',
  '| var ipaddr ',
  '\ w: | y:',
  '\ w:',
  '| hole',
  '\ w:',
  '| out:'

PCSERVER REXX - WEENYSRV REXX equivalent
<stuff in callpipe>
  '  *:',
  '| fo: fanout',
  '| totarget nlocate',
  '| stem hdrs.',
  '| pick anycase w1 == ,Content-Length:,',
  '| spec w2 1',
  '| *.output.2:',
  '\ fo:',
  '| frtarget nlocate ',
  '| drop 1',
  '| change x25 x40 ',
  '| var jsonString'
say 'Length(jsonString)='Length(jsonString)

<input processing and response build/send>

Reply via email to