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
I just tried to run the code sample (on iOS) and found out that the first parameter for the respond method call is not correct.
The sample should look like this:
componentWillMount(){// initalize the server (now accessible via localhost:1234)httpBridge.start(5561,"bonjourName",function(request){// you can use request.url, request.type and request.postData hereif(request.type==="GET"&&request.url.split("/")[1]==="users"){httpBridge.respond(request.requestId,200,"application/json","{\"message\": \"OK\"}");}else{httpBridge.respond(request.requestId,400,"application/json","{\"message\": \"Bad Request\"}");}});}
request.requestId is missing in your code.
Edit:
Just saw that pull request #10 contains the same correction.
The text was updated successfully, but these errors were encountered:
I just tried to run the code sample (on iOS) and found out that the first parameter for the respond method call is not correct.
The sample should look like this:
request.requestId
is missing in your code.Edit:
Just saw that pull request #10 contains the same correction.
The text was updated successfully, but these errors were encountered: