Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: sdk/lib/_internal/pub/lib/src/command_lish.dart

Issue 16351003: Move pub over to using the pub.dartlang.org API v2. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/pub/lib/src/command_lish.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command_lish.dart b/sdk/lib/_internal/pub/lib/src/command_lish.dart
index 20bbdd8e528afce776d42feeae8307468ced0399..8e4e09cf6aa16f3de633c0cd60ae192f80ba17af 100644
--- a/sdk/lib/_internal/pub/lib/src/command_lish.dart
+++ b/sdk/lib/_internal/pub/lib/src/command_lish.dart
@@ -54,8 +54,8 @@ class LishCommand extends PubCommand {
return log.progress('Uploading', () {
// TODO(nweiz): Cloud Storage can provide an XML-formatted error. We
// should report that error and exit.
- var newUri = server.resolve("/packages/versions/new.json");
- return client.get(newUri).then((response) {
+ var newUri = server.resolve("/api/packages/versions/new");
+ return client.get(newUri, headers: PUB_API_HEADERS).then((response) {
var parameters = parseJsonResponse(response);
var url = _expectField(parameters, 'url', response);
@@ -78,7 +78,7 @@ class LishCommand extends PubCommand {
var location = response.headers['location'];
if (location == null) throw new PubHttpException(response);
return location;
- }).then((location) => client.get(location))
+ }).then((location) => client.get(location, headers: PUB_API_HEADERS))
.then(handleJsonSuccess);
});
}).catchError((error) {
« no previous file with comments | « pkg/scheduled_test/test/descriptor/nothing_test.dart ('k') | sdk/lib/_internal/pub/lib/src/command_uploader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698