Skip to content
Frank Purcell edited this page Jul 19, 2011 · 4 revisions

OTP will produce either JSON or XML (default).

To produce JSON output, make your request with the header 'Accept : application/json'.

curl --header "Accept: application/json" "http://maps5.trimet.org/osm?mode=BICYCLE&toPlace=45.504966095685%2C-122.65434928842&fromPlace=45.511522523642%2C-122.64763303705"

vs.

curl --header "Accept: text/xml" "http://maps5.trimet.org/osm?mode=BICYCLE&toPlace=45.504966095685%2C-122.65434928842&fromPlace=45.511522523642%2C-122.64763303705"

Clone this wiki locally