Skip to content

Commit

Permalink
Use 4.0.1 version of the swim backend
Browse files Browse the repository at this point in the history
  • Loading branch information
ajay-gov committed Jul 27, 2022
1 parent 23f81f2 commit c402e9f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
swim.version=3.11.0
swim.version=4.0.1
6 changes: 3 additions & 3 deletions http_lanes/src/main/java/swim/basic/UnitAgent.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ public class UnitAgent extends AbstractAgent {
HttpLane<Value> http = this.<Value>httpLane()
.doRespond(request -> {
if (HttpMethod.POST.equals(request.method())) {
this.state.set(request.entity().get());
this.state.set(request.payload().get());
}
return HttpResponse.from(HttpStatus.OK)
return HttpResponse.create(HttpStatus.OK)
.body(Recon.toString(this.state.get()), MediaType.applicationXRecon());
});

@SwimLane("httpJson")
HttpLane<Value> httpJson = this.<Value>httpLane()
.doRespond(request ->
HttpResponse.from(HttpStatus.OK)
HttpResponse.create(HttpStatus.OK)
.body(Json.toString(this.state.get()), MediaType.applicationJson()));

@Override
Expand Down
4 changes: 2 additions & 2 deletions project.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ afterEvaluate {
'--patch-module', "$moduleName=" + files(sourceSets.main.resources.srcDirs).asPath]
options.encoding = 'UTF-8'
source = sourceSets.main.allJava
sourceCompatibility = JavaVersion.VERSION_1_9
targetCompatibility = JavaVersion.VERSION_1_9
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}

0 comments on commit c402e9f

Please sign in to comment.