[OSM-dev] Test Api URL Site Issues

David Serenity debukali at gmail.com
Wed Apr 25 13:23:39 BST 2012


Hi all,

I have the following code to create a changeset which works okay with the
production URL *http://api.openstreetmap.org/ . *The code however returns
an error when i use the test api url of  *
http://api06.dev.openstreetmap.org/. *Is the test api down now or is there
any thing wrong with my code. Thanks.

function createChangeset() {
  var d = $.Deferred();
  $.ajax({
    url: 'http://api.openstreetmap.org/api/0.6/changeset/create',
    type: 'POST',

    data: "<osm><changeset><tag k='created_by' v='Easymappr' /><tag
k='comment' v='OSM edited with EasyMappr' /></changeset></osm>",
    beforeSend: makeBeforeSend("PUT"),
    success: function(resp) {
      d.resolve(resp);
     alert(resp);
    },
    error: function(err){
      d.reject(err);
     alert("Error: "+err);
    },
    timeout: 30 * 1000
    });

  return d;
}

Regards,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20120425/1dd69b65/attachment.html>


More information about the dev mailing list