Re: YAJL
[email protected] Mon, 17 Oct 2022 19:34:25 -0400
| Newsgroups | gmane.comp.systems.as400.web |
|---|---|
| Message-ID | <[email protected]> |
Maybe I'm just being dense here but when I pull data from filebase, it is not chunked. Is this a limitation of Apache or YAJL or why can't I do it with the IBM i? -----Original Message----- From: WEB400 <[email protected]> On Behalf Of Brad Stone Sent: Monday, October 17, 2022 7:15 PM To: Web Enabling the IBM i (AS/400 and iSeries) <[email protected]> Subject: Re: [WEB400] YAJL If the chunked data is being received from the server, you need an application that can handle chunked data responses... like GETURI or HTTPAPI when making the request. You can't just tell a server "hey, don't send me chunked data". :) If the chunked data is what you are sending out to the endpoint, they should be able to handle that as well. On Mon, Oct 17, 2022 at 6:06 PM <[email protected]> wrote: > So is there a way to turn that off? Everything that I am finding via > Google search does not seem to apply. > > -----Original Message----- > From: WEB400 <[email protected]> On Behalf Of Brad > Stone > Sent: Monday, October 17, 2022 6:59 PM > To: Web Enabling the IBM i (AS/400 and iSeries) > <[email protected] > > > Subject: Re: [WEB400] YAJL > > Ah, good call! I missed the chunked part! > > On Mon, Oct 17, 2022 at 5:41 PM Nadir Amra <amra-r/[email protected]> wrote: > > > In the HTTP protocol, one can use content-length, or chunked, or > > connection close when reading data. > > > > In this case, the response is sent as chunked, as indicated by > > Transfer-Encoding: chunked. > > > > In this case, there is a length, followed by payload, any number of > > this combination, followed by 0 to indicate end of data. > > > > --------------------------------------------------- > > > > From: WEB400 <[email protected]> on behalf of > > [email protected] <[email protected]> > > Date: Monday, October 17, 2022 at 5:16 PM > > To: 'Web Enabling the IBM i (AS/400 and iSeries)' < > > [email protected]> > > Subject: [EXTERNAL] [WEB400] YAJL > > I have an RPGLE program creating JSON using YAJL. When I dump the > > buffer to the IFS, the data is correct. However, when I return it > > to my app or Fiddler (with Fiddler I can look at the raw hex coming > > back), it has extra characters before and after the JSON data. > > > > > > > > Below is the complete response that I am receiving. Any idea where > > the 13e in the middle and the 0 at the end are coming from? These > > are not in the buffer when I dump it to the IFS. I am guessing this > > is somehow related to a configuration of the HTTP server but since I > > don't know what the characters are, I don't know what to look for to > > know how to turn them off. > > > > > > > > > > > > > > > > HTTP/1.1 200 OK > > > > Date: Mon, 17 Oct 2022 21:10:11 GMT > > > > Server: Apache > > > > Connection: close > > > > Transfer-Encoding: chunked > > > > Content-Type: application/json; charset=utf-8 > > > > > > > > 13e > > > > { > > > > "sqlString": "select * from $http.custfile", > > > > "results": [ > > > > { > > > > "CUSTNO": "1", > > > > "NAME": "Cust 1", > > > > "STREET": "Street 1", > > > > "CITY": "City 1", > > > > "STATE": "ST", > > > > "POSTAL": "12345-6789" > > > > } > > > > ], > > > > "status": true, > > > > "message": "" > > > > } > > > > > > > > 0 > > > > > > > > -- > > This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) > > mailing list To post a message email: [email protected] To > > subscribe, unsubscribe, or change list options, > > visit: https://lists.midrange.com/mailman/listinfo/web400 > > or email: [email protected] Before posting, please > > take a moment to review the archives at > > https://archive.midrange.com/web400 . > > -- > > This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) > > mailing list To post a message email: [email protected] To > > subscribe, unsubscribe, or change list options, > > visit: https://lists.midrange.com/mailman/listinfo/web400 > > or email: [email protected] Before posting, please > > take a moment to review the archives at > > https://archive.midrange.com/web400. > > > > > -- > This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) > mailing list To post a message email: [email protected] To > subscribe, unsubscribe, or change list options, > visit: https://lists.midrange.com/mailman/listinfo/web400 > or email: [email protected] Before posting, please > take a moment to review the archives at https://archive.midrange.com/web400. > > > -- > This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) > mailing list To post a message email: [email protected] To > subscribe, unsubscribe, or change list options, > visit: https://lists.midrange.com/mailman/listinfo/web400 > or email: [email protected] Before posting, please > take a moment to review the archives at > https://archive.midrange.com/web400. > > -- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: [email protected] To subscribe, unsubscribe, or change list options, visit: https://lists.midrange.com/mailman/listinfo/web400 or email: [email protected] Before posting, please take a moment to review the archives at https://archive.midrange.com/web400. -- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: [email protected] To subscribe, unsubscribe, or change list options, visit: https://lists.midrange.com/mailman/listinfo/web400 or email: [email protected] Before posting, please take a moment to review the archives at https://archive.midrange.com/web400.