From a45a55ae3849f155817055a3384a74eed387614b Mon Sep 17 00:00:00 2001 From: Vladimir Enchev Date: Wed, 14 May 2014 10:56:57 +0300 Subject: [PATCH] http module fixed --- Tests/http_tests.ts | 2 +- http/http_request.android.ts | 2 +- http/http_request.ios.ts | 2 +- image/Readme.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Tests/http_tests.ts b/Tests/http_tests.ts index 2d1322d01..8996cd2df 100644 --- a/Tests/http_tests.ts +++ b/Tests/http_tests.ts @@ -36,7 +36,7 @@ export var test_getImage_isDefined = function () { export var test_getImage = function () { http.getImage("http://www.google.com/images/errors/logo_sm_2.png").then(function (result) { - TKUnit.assert(result instanceof require("Image").Image, "Result from getImage() should be valid Image object!"); + TKUnit.assert(result instanceof require("image").Image, "Result from getImage() should be valid Image object!"); }); }; diff --git a/http/http_request.android.ts b/http/http_request.android.ts index 794301495..80ac1b7b6 100644 --- a/http/http_request.android.ts +++ b/http/http_request.android.ts @@ -25,7 +25,7 @@ export function request(options: http.HttpRequestOptions): promises.Promise { return null }, toJSON: () => { return null }, - toImage: () => { return require("Image/image").fromNativeBitmap(data); } + toImage: () => { return require("image").fromNativeBitmap(data); } }, statusCode: 0, headers: {} diff --git a/http/http_request.ios.ts b/http/http_request.ios.ts index ace103010..3ecc4ed11 100644 --- a/http/http_request.ios.ts +++ b/http/http_request.ios.ts @@ -56,7 +56,7 @@ export function request(options: http.HttpRequestOptions): promises.Promise { return NSDataToString(data); }, toJSON: () => { return JSON.parse(NSDataToString(data)); }, - toImage: () => { return require("Image/image").fromData(data); } + toImage: () => { return require("image").fromData(data); } }, statusCode: response.statusCode(), headers: headers diff --git a/image/Readme.md b/image/Readme.md index 9cbaea654..731f0254c 100644 --- a/image/Readme.md +++ b/image/Readme.md @@ -1,6 +1,6 @@ The way we get local path here is different for now. Maybe we should get it from FS module in the future samples. Sample code Android: ``` -var Image = require("Image").Image; +var Image = require("image").Image; var baseImage = Image.imageFromResource('foxie'); ```