Changeset 1879 in josm for trunk/src/org/openstreetmap/josm/io/OsmApi.java
- Timestamp:
- 02.08.2009 14:36:40 (3 years ago)
- File:
-
- 1 edited
-
trunk/src/org/openstreetmap/josm/io/OsmApi.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/OsmApi.java
r1870 r1879 21 21 import java.util.ArrayList; 22 22 import java.util.Collection; 23 import java.util.Collections; 23 24 import java.util.HashMap; 24 25 import java.util.Properties; … … 268 269 * @throws OsmTransferException if something goes wrong 269 270 */ 270 public void deletePrimitive(OsmPrimitive osm ) throws OsmTransferException {271 public void deletePrimitive(OsmPrimitive osm, ProgressMonitor monitor) throws OsmTransferException { 271 272 initialize(); 272 // legacy mode does not require payload. normal mode (0.6 and up) requires payload for version matching. 273 sendRequest("DELETE", OsmPrimitiveType.from(osm).getAPIName()+"/" + osm.id, version.equals("0.5") ? null : toXml(osm, false)); 273 // can't use a the individual DELETE method in the 0.6 API. Java doesn't allow 274 // submitting a DELETE request with content, the 0.6 API requires it, however. Falling back 275 // to diff upload. 276 // 277 uploadDiff(Collections.singleton(osm), monitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false)); 274 278 } 275 279 … … 400 404 while(true) { // the retry loop 401 405 try { 402 URL url = new URL(new URL(getBaseUrl()), urlSuffix , new MyHttpHandler());406 URL url = new URL(new URL(getBaseUrl()), urlSuffix); 403 407 System.out.print(requestMethod + " " + url + "... "); 404 408 activeConnection = (HttpURLConnection)url.openConnection();
Note: See TracChangeset
for help on using the changeset viewer.
