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

RE: HTTP headers "Accept"



From looking quickly at the documentation, it isn't ACCEPT that you want. I think you just need to send it the Content-type: text/xml. I don't see it right off the top of my head but I think that is the default for http_url_get_xml().

If not, it is the 8th parameter when you code it. See EXAMPLE16 or EXAMPLE17 for examples.


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Tomas Martinez
Sent: Thursday, April 04, 2013 1:00 PM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: HTTP headers "Accept"

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
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 |
www.cityfurniture.com <http://www.cityfurniture.com/>   

 

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