Skip to content

Comments

Refactor code and fix support spring 2.1.x#65

Merged
kuraydev merged 1 commit intokuraydev:masterfrom
baonguyena1:master
Aug 26, 2019
Merged

Refactor code and fix support spring 2.1.x#65
kuraydev merged 1 commit intokuraydev:masterfrom
baonguyena1:master

Conversation

@baonguyena1
Copy link

Refactor code for the same logic when connecting with the socket
Fix connection headers for supporting spring 2.1.x

Refactor code for the same logic when connect with the socket
}
}

public func openSocketWithURLRequest(request: NSURLRequest, delegate: StompClientLibDelegate) {
Copy link
Owner

Choose a reason for hiding this comment

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

Actually without header still would be useful. It should stay with overload methods.

Copy link
Author

Choose a reason for hiding this comment

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

Yup, you right, but I keep the same function with default connectionHeaders properties with null value with one function for the same logic, don't need override. With default connectionHeaders value in function define, you can use with without header or not, like

Without headers with defaults value is null:
socketClient.openSocketWithURLRequest(request: request, delegate: delegate)

With headers:
socketClient.openSocketWithURLRequest(request: request, delegate: delegate, connectionHeaders: headers)

Copy link
Owner

Choose a reason for hiding this comment

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

Awesome answer :) Have you tested it? Does it work with your way? If it is, I will merge it and publish a new version 🎉

Copy link
Author

Choose a reason for hiding this comment

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

Yup, I have tested it with my project.

Copy link
Owner

Choose a reason for hiding this comment

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

Nice job :) I'm gonna test it and release it soon

@kuraydev
Copy link
Owner

kuraydev commented Aug 26, 2019

@baonguyena1 Thank you so much for contribution :) I merged your PR and published a new release.

🎉Release 1.3.7 🎉

Screenshot 2019-08-26 at 14 45 51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants