Skip to content

Commit 1c355c5

Browse files
authored
Merge pull request #10 from saibotd/patch-1
Update README.md
2 parents 3cd8f55 + 1f3ad98 commit 1c355c5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ Initalize the server in the `componentWillMount` lifecycle method. You need to p
4040

4141
componentWillMount() {
4242
// initalize the server (now accessible via localhost:1234)
43-
httpBridge.start(5561, function(request) {
43+
httpBridge.start(5561, 'http_service' request => {
4444

4545
// you can use request.url, request.type and request.postData here
4646
if (request.type === "GET" && request.url.split("/")[1] === "users") {
47-
httpBridge.respond(200, "application/json", "{\"message\": \"OK\"}");
47+
httpBridge.respond(request.requestId, 200, "application/json", "{\"message\": \"OK\"}");
4848
} else {
49-
httpBridge.respond(400, "application/json", "{\"message\": \"Bad Request\"}");
49+
httpBridge.respond(request.requestId, 400, "application/json", "{\"message\": \"Bad Request\"}");
5050
}
5151

5252
});

0 commit comments

Comments
 (0)