-
Notifications
You must be signed in to change notification settings - Fork 1k
JsonOrXml
barbeau edited this page Oct 25, 2012
·
4 revisions
OTP will produce either JSON or XML (default).
To produce JSON output, make your request with the header 'Accept : application/json'.
EXAMPLE:
curl --header "Accept: application/json" "http://maps5.trimet.org/osm?mode=BICYCLE&toPlace=45.504966%2C-122.654349&fromPlace=45.5115225%2C-122.647633"
vs.
curl --header "Accept: application/xml" "http://maps5.trimet.org/osm?mode=BICYCLE&toPlace=45.504966%2C-122.654349&fromPlace=45.5115225%2C-122.647633"
unless you are intentionally working with legacy versions of OpenTripPlanner. Please consult the current documentation at readthedocs