Re: [OSM-dev] Test Api URL Site Issues

2012-04-26 Thread Cyrille Giquello
2012/4/25 David Serenity debuk...@gmail.com:
 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: osmchangesettag 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;
 }


Hello David,

U don't tell anything about the error. Could you give the http answer ?
The code should be exactly the same on the two APIs, just the url and
user credentials are  differents.
Idea: are you using an user account which exists at
api06.dev.openstreetmap.org ?

Cheers



-- 
Cyrille.

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


[OSM-dev] Test Api URL Site Issues

2012-04-25 Thread David Serenity
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: osmchangesettag 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
___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev