Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix #75] Server Treats NON-Message as CON-Message #78

Conversation

eugene-nikolaev
Copy link
Contributor

Request#type is now Type.CON by default.

CoapClient: Move setting the request type to the convenience methods.
Client code can use the advanced() methods for sending a request that
it has configured manually whereas the convenience methods can be used
in the established way.

Uses Request#uri (if not blank) in the advanced() methods instead of CoapClient#uri.

Signed-off-by: Eugene Nikolaev eug.nikolaev@gmail.com

Request#type is now Type.CON by default.

CoapClient: Move setting the request type to the convenience methods.
Client code can use the advanced() methods for sending a request that
it has configured manually whereas the convenience methods can be used
in the established way.

Uses Request#uri (if not blank) in the advanced() methods instead of CoapClient#uri.

Signed-off-by: Eugene Nikolaev <eug.nikolaev@gmail.com>

CoapResponse resp = client.advanced(request);

Assert.assertEquals(CONTENT_1, resp.getResponseText());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this assert that the request indeed contained a CON? The fact that we receive a response merely means that the request has been received and processed by the server ... We should at least assert that the response is of type ACK, i.e. the server piggybacked the response, shouldn't we?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks, sure we should...
I'll add the asserts but here is another one issue, I'll point to it. Need advice, please.

@eugene-nikolaev
Copy link
Contributor Author

Closed due to new pull-request creation (apply review comments)

@eugene-nikolaev eugene-nikolaev deleted the 75-coap-client-con-non branch July 21, 2016 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants