PDA

View Full Version : Suggestion: cJsonHttpTransfer new methods



raveens
13-Sep-2020, 05:27 PM
Hi DAW,


Can we please have the following (new) methods for the cJsonHttpTransfer / cHttpTransfer class ?



(Get) ResponseHttpHeaderStr - to return the entire header of a HTTP response header as a string - good for debugging. The current "ResponseHeader" function is too limited as you need to specify the header names.

Or if that not possible, please provide a method to return the "NumHeaderFields" and "GetHeaderName(int iIndex)"
Or "ListofHeaderFields" that we can use to retrieve the response header information


URLEncode - currently this function is in the "cWebEndPoint_Mixin.pkg", if this could be split into its own mixin pkg then it could be mixed into the cJsonHttpTransfer or cHttpTransfer class
URLDecode - currently this function is in the "cWebEndPoint_Mixin.pkg", if this could be split into its own mixin pkg then it could be mixed into the cJsonHttpTransfer or cHttpTransfer class


Thanks

Frank Cheng
13-Sep-2020, 08:47 PM
Hi Raveen,

This is kinda OT. When calling ResponseHeader, all it does is to call HttpQueryInfo with HTTP_QUERY_CUSTOM from INTRANSF.dll. All DAW has to do is do change the flag to HTTP_QUERY_RAW_HEADERS_CRLF, and viola, you get all the headers in a "CRLF" delimited fashion.

Frank Cheng

DaveR
18-Sep-2020, 10:32 AM
I was going to chime in by suggesting (1) returned a struct but I suppose that wouldn't be helpful where the response had a broken structure. So +1