[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: url encode http_url_get_raw



   Because it's a varying length variable, and you want to start after
   the 2 byte length value.

   On Wed, Dec 16, 2009 at 9:54 AM, Robert Upshall
   <[1]rupshall@xxxxxxxxxxx> wrote:

     Thanks for the link Mike,
     <snip>
     // encode the address request
           Enc = http_url_encoder_new();
           rc2 = http_url_encoder_addvar( Enc:
               'XML':
               %addr(addressRequest) + 2:
               %len(addressRequest));
           bigString = http_url_encoder_getstr( Enc );
     </snip>
     It looks like that is what I was looking for, in this sample its
     using
     'XML' ,   what would this need to be for a typical GET set of
     parameters?
     Also, can somebody explain the +2 in %addr(addressRequest) + 2:?
     Thanks,
     Robert
     Mike Krebs wrote:
     > Robert,
     >
     > Something similar...
     >
     [2]http://www.scottklement.com/archives/ftpapi/200906/msg00110.html
     >
     >
     >
     >
     >> -----Original Message-----
     >> From: [3]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
     [mailto:[4]ftpapi-
     >> [5]bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Robert Upshall
     >> Sent: Wednesday, December 16, 2009 7:17 AM
     >> To: HTTPAPI and FTPAPI Projects
     >> Subject: Re: url encode http_url_get_raw
     >>
     >> Hi Scott,
     >>
     >> That is true, I wasn't thinking about it like that.
     >>
     >> I looked at the ENCODERR4 src and I see allot of methods I think
     I need
     >> to use "url_encode()" on the parm section of my URL but I don't
     see any
     >> of the examples using this method?  Is this the method I need to
     be
     >> using?  Are there any examples of it being used?
     >>
     >> Thanks,
     >> Robert
     >>
     >>
     >>
     >>
     >> Scott Klement wrote:
     >>
     >>> Hi Robert,
     >>>
     >>> How would HTTPAPI know which parts of your URL are intended to
     be
     >>>
     >> taken
     >>
     >>> literally, and which parts are intended to be encoded?!
     >>>
     >>> If you need to URL encode your URL, then please call the URL
     encoder
     >>> routines.
     >>>
     >>>
     >>>
     >>> Robert Upshall wrote:
     >>>
     >>>
     >>>> Do I need to do anything special to make http_url_get_raw
     encode the
     >>>>
     >> URL
     >>
     >>>> before it makes the server request?
     >>>>
     >>>> Here is call to http_url_get_raw:
     >>>>
     >>>>      rc=http_url_get_raw(%trim(url):1:%paddr('INCOMING'));
     >>>>
     >>>> I'd like to make sure the field "url" is encoded.
     >>>>
     >>>>
     >>>
     -------------------------------------------------------------------
     --
     >>>
     >> --
     >>
     >>> This is the FTPAPI mailing list.  To unsubscribe, please go to:
     >>> [6]http://www.scottklement.com/mailman/listinfo/ftpapi
     >>>
     -------------------------------------------------------------------
     --
     >>>
     >> --
     >>
     >>>
     >>
     -------------------------------------------------------------------
     ----
     >> This is the FTPAPI mailing list.  To unsubscribe, please go to:
     >> [7]http://www.scottklement.com/mailman/listinfo/ftpapi
     >>
     -------------------------------------------------------------------
     ----
     >>
     >
     -------------------------------------------------------------------
     ----
     > This is the FTPAPI mailing list.  To unsubscribe, please go to:
     > [8]http://www.scottklement.com/mailman/listinfo/ftpapi
     >
     -------------------------------------------------------------------
     ----
     >
     >
     -------------------------------------------------------------------
     ----
     This is the FTPAPI mailing list.  To unsubscribe, please go to:
     [9]http://www.scottklement.com/mailman/listinfo/ftpapi
     -------------------------------------------------------------------
     ----

References

   1. mailto:rupshall@xxxxxxxxxxx
   2. http://www.scottklement.com/archives/ftpapi/200906/msg00110.html
   3. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   4. mailto:ftpapi-
   5. mailto:bounces@xxxxxxxxxxxxxxxxxxxxxx
   6. http://www.scottklement.com/mailman/listinfo/ftpapi
   7. http://www.scottklement.com/mailman/listinfo/ftpapi
   8. http://www.scottklement.com/mailman/listinfo/ftpapi
   9. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------