Skip to content

Commit

Permalink
fix(lnlambda): fix XMLHttpRequest exception
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <[email protected]>
  • Loading branch information
vincenzopalazzo committed Aug 13, 2022
1 parent 505385f commit 92939e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/lnlambda/changelog.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"package_name": "lnlambda",
"version": "v0.0.1-beta.3",
"version": "v0.0.1-beta.4",
"api": {
"name": "github",
"repository": "dart-lightning/lndart.cln",
Expand Down
6 changes: 5 additions & 1 deletion packages/lnlambda/lib/src/lnlambda_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ class LNLambdaClient implements LightningClient {
method: method,
params: params);
var response = await http.post(Uri.parse("$lambdaServer/lnsocket"),
headers: {'Content-Type': 'application/json; charset=UTF-8'},
headers: {
"Accept": "application/json",
"Access-Control_Allow_Origin": "*",
'Content-Type': 'application/json; charset=UTF-8',
},
body: json.encode(request.toJSON()));
Map<String, dynamic> result = json.decode(response.body);
if (result.containsKey("errors")) {
Expand Down

0 comments on commit 92939e2

Please sign in to comment.