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

Re: HTTP headers "Accept"



   To do that, you need to use an exit procedure ("xproc") registrered to
   the HTTP_POINT_ADDL_HEADER exit point.  With this procedure, you can
   insert any additional HTTP headers you like, including the "Accept"
   header that you asked about.
   You'd need to code this before calling the http_url_get_xml() routine:
      http_xproc( HTTP_POINT_ADDL_HEADER
                : %paddr(myProc) );
   And then, somewhere in your program, you'd need to define the myProc
   procedure that supplies the additional http headers:
   P myProc          b
   D                 PI
   D   Headers                  32767a   varying
    /free
      Headers = 'Accept: text/xml' + x'0d25';
    /end-free
   P                 E

   On 4/4/2013 1:00 PM, Tomas Martinez wrote:

   Hi,

   Let me start by thanking all the contributors of this list that have
   helped me over the years with your questions and responses,  Specially
   Scott and Thomas.


   Problem:

   Since Yahoo stopped supporting the where.yahoo.com service to geocode
   addresses, I'm using the web service from smartystrees.com to clean and
   geocode addresses on and interactive job.


   http_url_get_xml() was working great with Yahoo! Because the default
   response would be an XML document, however the default response from
   smartystreets is a json document.  To get the response as an XML I need
   to pass the HTTP header "Accept:text/xml".


   Question:

   I know we can pass the "content-type" HTTP header... is there a way to
   pass the HTTP header "Accept:text/xml"?

   You can see the documentation at
   [1][1]http://smartystreets.com/kb/liveaddress-api/rest-endpoint for more
   details.


   Thanks,

   Tomas Martinez | IT Department | Systems Analyst
   City Furniture | 6701 N Hiatus Road | Tamarac, FL 33321
   | [2]www.cityfurniture.com

References

   1. [2]http://smartystreets.com/kb/liveaddress-api/rest-endpoint
   2. [3]http://www.cityfurniture.com/


-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
[4]http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

References

   1. http://smartystreets.com/kb/liveaddress-api/rest-endpoint
   2. http://smartystreets.com/kb/liveaddress-api/rest-endpoint
   3. http://www.cityfurniture.com/
   4. 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
-----------------------------------------------------------------------