mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
readme updated again
This commit is contained in:
@ -1,28 +1,3 @@
|
||||
Sample code:
|
||||
```js
|
||||
var http = require("http");
|
||||
Definition: https://github.com/telerik/xPlatCore/blob/master/JS/BCL/http/http.d.ts
|
||||
|
||||
// Universal request method. You can use HttpRequestOptions to set varios properties like url, headers, etc.,
|
||||
// HttpResponse to get status code, headers and content and HttpContent to get body of response:
|
||||
|
||||
interface HttpRequestOptions {
|
||||
url: string;
|
||||
method: string;
|
||||
headers?: any;
|
||||
content?: HttpContent;
|
||||
}
|
||||
|
||||
interface HttpResponse {
|
||||
statusCode: number;
|
||||
headers: any;
|
||||
content?: HttpContent;
|
||||
}
|
||||
|
||||
interface HttpContent {
|
||||
toString: () => string;
|
||||
toJSON: () => any;
|
||||
toImage: () => image_module.Image;
|
||||
}
|
||||
```
|
||||
|
||||
More info: https://github.com/telerik/xPlatCore/blob/master/Documentation/Snippets/http.md
|
||||
Sample code: https://github.com/telerik/xPlatCore/blob/master/Documentation/Snippets/http.md
|
Reference in New Issue
Block a user