There's only so many times you can try to take away the footgun before the
   only thing left to do is wipe your hands and walk away.
    
     ----- Original message -----
     From: B Stone <bvstone@xxxxxxxxx>
     Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxxxxxxxx>
     To: Midrange Systems Technical Discussion
     <midrange-l@xxxxxxxxxxxxxxxxxx>
     Cc:
     Subject: Re: Help With Getting HTTP Server running
     Date: Thu, Feb 14, 2019 11:06 AM
      
     Jay,
     I am cutting you some slack and trying to explain you're dong it wrong.
     Don't put json data in the  URI.  Put it in standard input as a POST.
      Then
     use yajl_stdin_load_tree() to read it in and parse it normally with
     YAJL.
     You can choose to do it any way you like, I'm just telling you how
     you're
     doing it is wrong.  I'll quit trying to help if you want.  It's not
     personally buddy.
     Bradley V. Stone
     www.bvstools.com
     Native IBM i e-Mail solutions for Microsoft Office 365, Gmail, or any
     Cloud
     Provider!
     On Thu, Feb 14, 2019 at 10:43 AM Jay Vaughn <jeffersonvaughn@xxxxxxxxx>
     wrote:
     > going back to SK's guide...
     > [1]
https://www.common.org/scotts-iland-blog/rpg-and-yajl/
     >
     > specifying a specific customer example...
     > [2]
http://our-system:12345/rest/custdetail/1500
     >
     > I'm just using a json input string instead...
     >
     > cut me some slack Brad - I was born and raised in lower Alabama...
     > sometimes transparency just works best with me. :)
     >
     > Jay
     >
     >
     > On Thu, Feb 14, 2019 at 11:37 AM B Stone <bvstone@xxxxxxxxx> wrote:
     >
     > > How are you reading it in?  That's what I'm probably "missing" haha.
     > >
     > > If you're using the YAJL function, or even just QtmhRdStin, I've
     never
     > seen
     > > the data encoded as a POST.
     > >
     > >
     > > Bradley V. Stone
     > > www.bvstools.com
     > > MAILTOOL Benefit #13 <[3]
https://www.bvstools.com/mailtool.html>:
     The
     > ability
     > > to use an IFS stream file as the body of the email (either text or
     html).
     > >
     > > On Thu, Feb 14, 2019 at 10:35 AM Jay Vaughn
     <jeffersonvaughn@xxxxxxxxx>
     > > wrote:
     > >
     > > > well i just tried doing a POST instead of a GET with the exact
     same
     > > > criteria and it came across encoded as well...
     > > >
     > > > so something you are missing Brad...
     > > >
     > > > but I am good from here - thanks to all that helped me with this.
     > > >
     > > > Jay
     > > >
     > > > On Thu, Feb 14, 2019 at 11:33 AM B Stone <bvstone@xxxxxxxxx>
     wrote:
     > > >
     > > > > Or you just just make it a POST and save some work.  :)
     > > > >
     > > > > Bradley V. Stone
     > > > > www.bvstools.com
     > > > > MAILTOOL Benefit #2 <[4]
https://www.bvstools.com/mailtool.html>:
     The
     > > > ability
     > > > > to specify a "From" and/or "Reply To" email address!
     > > > >
     > > > > On Thu, Feb 14, 2019 at 10:31 AM Jay Vaughn <
     > jeffersonvaughn@xxxxxxxxx
     > > >
     > > > > wrote:
     > > > >
     > > > > > here is how i'm going to deal with it so that the front end
     guy is
     > > not
     > > > > > burdened with it...
     > > > > >
     > > > > > in my rpgle pgm..
     > > > > >
     > > > > > EVAL jsonINP
     > > > > > jsonINP =
     > > > > >
     > >  ....5...10...15...20...25...30...35...40...45...50...55...60
     > > > > >      1   '%7B%22env%22:%22D3X%22,%22command%22:%22GET_L'
     > > > > >     61
     > >  'OAN_BORROWER%22,%22payload%22:[%7B%22loanNumber%22:2428%7D]%'
     > > > > >    121   '7D
     > > > > >
     > > > > >
     > > > > > jsonINP = %scanrpl('%7B'
     > > > > >                   :'{'
     > > > > >                   :jsonINP);
     > > > > >
     > > > > > jsonINP = %scanrpl('%7D'
     > > > > >                   :'}'
     > > > > >                   :jsonINP);
     > > > > >
     > > > > > jsonINP = %scanrpl('%22'
     > > > > >                   :'"'
     > > > > >                   :jsonINP);
     > > > > >
     > > > > > and wala...
     > > > > >
     > > > > > EVAL jsonINP
     > > > > > JSONINP =
     > > > > >
     > >  ....5...10...15...20...25...30...35...40...45...50...55...60
     > > > > >      1
     > >  '{"env":"D3X","command":"GET_LOAN_BORROWER","payload":[{"loan'
     > > > > >     61   'Number":2428}]}
     > > > > >
     > > > > >
     > > > > > sometimes just not worth the risk of leaving it up to others..
     and
     > > > > > considering the fact i'm using a rather unorthodoxed way with
     this
     > > > whole
     > > > > > process I better assume that responsibilty...
     > > > > >
     > > > > > now last thing is to have the YAJL produce back out the
     generate
     > json
     > > > > > output and I'm done!
     > > > > >
     > > > > > Jay
     > > > > >
     > > > > >
     > > > > >
     > > > > >
     > > > > >
     > > > > >
     > > > > >
     > > > > > On Thu, Feb 14, 2019 at 11:09 AM Nadir Amra <amra@xxxxxxxxxx>
     > wrote:
     > > > > >
     > > > > > > You have to deal with the decoding, that is part of the HTTP
     > > standard
     > > > > > with
     > > > > > > regards to what characters may be specified on a URL.  So
     browser
     > > > > encodes
     > > > > > > before sending.
     > > > > > >
     > > > > > >
     > > > > > >
     > > > > > >
     > > > > > >
     > > > > > >
     > > > > > > "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> wrote
     on
     > > > > 02/14/2019
     > > > > > > 09:47:58 AM:
     > > > > > >
     > > > > > > > From: Jay Vaughn <jeffersonvaughn@xxxxxxxxx>
     > > > > > > > To: Midrange Systems Technical Discussion
     > > > > > > <midrange-l@xxxxxxxxxxxxxxxxxx>
     > > > > > > > Date: 02/14/2019 09:57 AM
     > > > > > > > Subject: Re: Help With Getting HTTP Server running
     > > > > > > > Sent by: "MIDRANGE-L"
     <midrange-l-bounces@xxxxxxxxxxxxxxxxxx>
     > > > > > > >
     > > > > > > > thanks Bradley - still not quite what i'm looking for...
     > > > > > > >
     > > > > > > > i think i may just about have it with the SK yahlserver
     > setup...
     > > > > > > >
     > > > > > > > so I can now reach my endpoint...
     > > > > > > >
     > > > > > > > my iseries YAJL pgm gets called but there seems to be some
     > > encoding
     > > > > > > going
     > > > > > > > on that is throwing off my json string...
     > > > > > > >
     > > > > > > > This is what I'm calling from ARC using the GET method...
     > > > > > > >
     > > > > > > >
     > > >
     /rest/wsr00000/{"env":"D3X","command":"GET_LOAN_BORROWER","payload":
     > > > > > > > [{"loanNumber":2428}]}
     > > > > > > >
     > > > > > > > in debug over on the i, I get this interpretation of it...
     > > > > > > >
     > > > > > > >  EVAL l_url
     > > > > > > > L_URL =
     > > > > > > >
     > > > >  ....5...10...15...20...25...30...35...40...45...50...55...60
     > > > > > > >      1
     > > > >  '/rest/wsr00000/%7B%22env%22:%22D3X%22,%22command%22:%22GET_L'
     > > > > > > >     61
     > > > >  'OAN_BORROWER%22,%22payload%22:[%7B%22loanNumber%22:2428%7D]%'
     > > > > > > >    121   '7D
     > > > > > > >
     > > > > > > > how can I preserve the original string format of the json
     > input?
     > > > > > > >
     > > > > > > > Ive tried enclosing the json input string in single quotes
     but
     > no
     > > > > luck.
     > > > > > > >
     > > > > > > > I've also tried an escape version of the string with no
     luck...
     > > > > > > >
     {\"env\":"D3X",\"command\":\"GET_LOAN_BORROWER\",\"payload\":
     > > > > > > > [{\"loanNumber\":2428}]}
     > > > > > > >
     > > > > > > >
     > > > > > > > any suggestions?  almost there!
     > > > > > > >
     > > > > > > > Jay
     > > > > > > >
     > > > > > > >
     > > > > > >
     > > > > > >
     > > > > > > --
     > > > > > > This is the Midrange Systems Technical Discussion
     (MIDRANGE-L)
     > > > mailing
     > > > > > list
     > > > > > > To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
     > > > > > > To subscribe, unsubscribe, or change list options,
     > > > > > > visit:
     [5]
https://lists.midrange.com/mailman/listinfo/midrange-l
     > > > > > > or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
     > > > > > > Before posting, please take a moment to review the archives
     > > > > > > at [6]
https://archive.midrange.com/midrange-l.
     > > > > > >
     > > > > > > Please contact support@xxxxxxxxxxxx for any subscription
     related
     > > > > > > questions.
     > > > > > >
     > > > > > > Help support midrange.com by shopping at amazon.com with our
     > > > affiliate
     > > > > > > link: [7]
https://amazon.midrange.com
     > > > > > >
     > > > > > --
     > > > > > This is the Midrange Systems Technical Discussion (MIDRANGE-L)
     > > mailing
     > > > > list
     > > > > > To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
     > > > > > To subscribe, unsubscribe, or change list options,
     > > > > > visit:
     [8]
https://lists.midrange.com/mailman/listinfo/midrange-l
     > > > > > or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
     > > > > > Before posting, please take a moment to review the archives
     > > > > > at [9]
https://archive.midrange.com/midrange-l.
     > > > > >
     > > > > > Please contact support@xxxxxxxxxxxx for any subscription
     related
     > > > > > questions.
     > > > > >
     > > > > > Help support midrange.com by shopping at amazon.com with our
     > > affiliate
     > > > > > link: [10]
https://amazon.midrange.com
     > > > > >
     > > > > --
     > > > > This is the Midrange Systems Technical Discussion (MIDRANGE-L)
     > mailing
     > > > list
     > > > > To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
     > > > > To subscribe, unsubscribe, or change list options,
     > > > > visit:
     [11]
https://lists.midrange.com/mailman/listinfo/midrange-l
     > > > > or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
     > > > > Before posting, please take a moment to review the archives
     > > > > at [12]
https://archive.midrange.com/midrange-l.
     > > > >
     > > > > Please contact support@xxxxxxxxxxxx for any subscription related
     > > > > questions.
     > > > >
     > > > > Help support midrange.com by shopping at amazon.com with our
     > affiliate
     > > > > link: [13]
https://amazon.midrange.com
     > > > >
     > > > --
     > > > This is the Midrange Systems Technical Discussion (MIDRANGE-L)
     mailing
     > > list
     > > > To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
     > > > To subscribe, unsubscribe, or change list options,
     > > > visit: [14]
https://lists.midrange.com/mailman/listinfo/midrange-l
     > > > or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
     > > > Before posting, please take a moment to review the archives
     > > > at [15]
https://archive.midrange.com/midrange-l.
     > > >
     > > > Please contact support@xxxxxxxxxxxx for any subscription related
     > > > questions.
     > > >
     > > > Help support midrange.com by shopping at amazon.com with our
     affiliate
     > > > link: [16]
https://amazon.midrange.com
     > > >
     > > --
     > > This is the Midrange Systems Technical Discussion (MIDRANGE-L)
     mailing
     > list
     > > To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
     > > To subscribe, unsubscribe, or change list options,
     > > visit: [17]
https://lists.midrange.com/mailman/listinfo/midrange-l
     > > or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
     > > Before posting, please take a moment to review the archives
     > > at [18]
https://archive.midrange.com/midrange-l.
     > >
     > > Please contact support@xxxxxxxxxxxx for any subscription related
     > > questions.
     > >
     > > Help support midrange.com by shopping at amazon.com with our
     affiliate
     > > link: [19]
https://amazon.midrange.com
     > >
     > --
     > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
     list
     > To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
     > To subscribe, unsubscribe, or change list options,
     > visit: [20]
https://lists.midrange.com/mailman/listinfo/midrange-l
     > or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
     > Before posting, please take a moment to review the archives
     > at [21]
https://archive.midrange.com/midrange-l.
     >
     > Please contact support@xxxxxxxxxxxx for any subscription related
     > questions.
     >
     > Help support midrange.com by shopping at amazon.com with our affiliate
     > link: [22]
https://amazon.midrange.com
     >
     --
     This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
     list
     To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
     To subscribe, unsubscribe, or change list options,
     visit: [23]
https://lists.midrange.com/mailman/listinfo/midrange-l
     or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
     Before posting, please take a moment to review the archives
     at [24]
https://archive.midrange.com/midrange-l.
     Please contact support@xxxxxxxxxxxx for any subscription related
     questions.
     Help support midrange.com by shopping at amazon.com with our affiliate
     link: [25]
https://amazon.midrange.com
      
    
References
   Visible links
   1. 
https://www.common.org/scotts-iland-blog/rpg-and-yajl/
   2. 
http://our-system:12345/rest/custdetail/1500
   3. 
https://www.bvstools.com/mailtool.html
   4. 
https://www.bvstools.com/mailtool.html
   5. 
https://lists.midrange.com/mailman/listinfo/midrange-l
   6. 
https://archive.midrange.com/midrange-l
   7. 
https://amazon.midrange.com/
   8. 
https://lists.midrange.com/mailman/listinfo/midrange-l
   9. 
https://archive.midrange.com/midrange-l
  10. 
https://amazon.midrange.com/
  11. 
https://lists.midrange.com/mailman/listinfo/midrange-l
  12. 
https://archive.midrange.com/midrange-l
  13. 
https://amazon.midrange.com/
  14. 
https://lists.midrange.com/mailman/listinfo/midrange-l
  15. 
https://archive.midrange.com/midrange-l
  16. 
https://amazon.midrange.com/
  17. 
https://lists.midrange.com/mailman/listinfo/midrange-l
  18. 
https://archive.midrange.com/midrange-l
  19. 
https://amazon.midrange.com/
  20. 
https://lists.midrange.com/mailman/listinfo/midrange-l
  21. 
https://archive.midrange.com/midrange-l
  22. 
https://amazon.midrange.com/
  23. 
https://lists.midrange.com/mailman/listinfo/midrange-l
  24. 
https://archive.midrange.com/midrange-l
  25. 
https://amazon.midrange.com/
As an Amazon Associate we earn from qualifying purchases.