You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-138Lines changed: 1 addition & 138 deletions
Original file line number
Diff line number
Diff line change
@@ -116,19 +116,6 @@ The `JsonServiceClient` is a smart full-featured Service Client implementation w
116
116
117
117
Behind the scenes `JsonServiceClient` leverages the optimal [`HttpClient` in dart:io](https://docs.flutter.io/flutter/dart-io/HttpClient-class.html) to perform HTTP Requests in Flutter and Dart VM Apps.
118
118
119
-
### JsonWebClient
120
-
121
-
The `servicestack` Dart package also includes an alternative `JsonWebClient` implementation which instead performs HTTP Requests using [dart:html BrowserClient](https://webdev.dartlang.org/angular/guide/server-communication) to use the browsers built-in `XMLHttpRequest` object. Despite their implementation differences `JsonWebClient` also supports the same feature-set as the Dart VM's `JsonServiceClient` above.
122
-
123
-
AngularDart or Dart Web Apps can use `JsonWebClient` by importing `web.dart`, e.g:
124
-
125
-
```dart
126
-
import 'package:servicestack/servicestack.dart';
127
-
import 'package:servicestack/web.dart';
128
-
129
-
var client = new JsonWebClient("https://www.techstacks.io");
130
-
```
131
-
132
119
### IServiceClient API
133
120
134
121
Both JSON Service Client variants implement the same flexible `IServiceClient` API below, use the same DTOs and implementation and throws the same structured `WebServiceException` which results in Typed API Requests being source-compatible between Dart Web Apps, Dart VM Server and AOT compiled Flutter Web Apps:
@@ -195,9 +182,7 @@ This creates a basic Flutter App which you can run in your Android Device or And
195
182
Then to use `JsonServiceClient` add the `servicestack` dependency to your apps [pubspec.yaml](https://github.com/ServiceStackApps/HelloFlutter/blob/master/pubspec.yaml):
196
183
197
184
dependencies:
198
-
flutter:
199
-
sdk: flutter
200
-
servicestack: "^1.0.0"
185
+
servicestack: "^1.0.2"
201
186
202
187
Saving `pubspec.yaml` automatically runs [flutter packages get](https://flutter.io/using-packages/) to install any new dependencies in your App.
203
188
@@ -480,128 +465,6 @@ To display the image we assign the response to the `imageBytes` field within the
The [HelloAngularDart](https://github.com/ServiceStackApps/HelloAngularDart) project demonstrates the same functionality in an AngularDart Web App running inside a Web Browser.
486
-
487
-
The only difference is having to also import `web.dart` containing the `JsonWebClient`:
488
-
489
-
```dart
490
-
import 'package:servicestack/web.dart';
491
-
```
492
-
493
-
and changing the clients to use the `JsonWebClient` instead, e.g:
494
-
495
-
```dart
496
-
var testClient = new JsonWebClient(TestBaseUrl);
497
-
var techstacksClient = new JsonWebClient(TechStacksBaseUrl);
498
-
```
499
-
500
-
But otherwise the actual client source code for all of the Typed API requests remains exactly the same.
501
-
502
-
The `HelloAngularDart` App is contained within the [hello_world](https://github.com/ServiceStackApps/HelloAngularDart/tree/master/lib/src/hello_world) component with all Dart logic in:
0 commit comments