How to use new Rest API support in 2.0.0.RC1

108 views
Skip to first unread message

Alexander Sarkisov

unread,
Feb 19, 2015, 9:17:35 AM2/19/15
to reactor-...@googlegroups.com
This API sounds awesome but without documentation is completely unusable.
Can anyone help me with at least an example of a
NetStreams.httpServer()

which would receive a json
{"name": "value"}

and reply with the same json?

Jon Brisbin

unread,
Feb 19, 2015, 9:51:25 AM2/19/15
to Alexander Sarkisov, Reactor Framework
I’m actually working on the documentation as we speak, as well as updating samples to try and illustrate this.

I’ll try and get some quickstart examples out today.

Thanks!

Jon Brisbin
Reactor Project Lead
@j_brisbin | @ProjectReactor

--
You received this message because you are subscribed to the Google Groups "reactor-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reactor-framew...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alexander Sarkisov

unread,
Feb 19, 2015, 11:50:04 AM2/19/15
to reactor-...@googlegroups.com, ma...@asarkisov.com
That is awesome!

I hope your time-zone is close to mine and your today is also a today for me.
I'm cooking something reactor based for tomorrow and it would be awesome if I could use Reactor for API layer as well as for business logic.

Cheers,
Alex

Jon Brisbin

unread,
Feb 19, 2015, 11:55:38 AM2/19/15
to Alexander Sarkisov, Reactor Framework
FWIW I’m Central US time zone…so however that works out for you.

Unfortunately I just hit an issue I want to deal with (that’s how it always happens! as soon as you release you find a bug!).

That said, you still CAN use Netty HTTP in Reactor directly. Until I get this issue fixed, I would just recommend using the TcpServer with HttpCodec added and use the raw Netty abstractions. You can find an example of that here (it’s just not as pretty as what we’ll end up having with “real” HTTP support):


I’ve also got a Reactor 1.1 example that uses HTTP in Reactor in the image thumbnailing example:


The syntax here is going to have to be adapted to the 2.0 version (that’s what I’ve been working on yesterday and today) but the concepts are basically the same.


Thanks!

Jon Brisbin
Reactor Project Lead
@j_brisbin | @ProjectReactor

Alexander Sarkisov

unread,
Feb 19, 2015, 4:51:00 PM2/19/15
to reactor-...@googlegroups.com, ma...@asarkisov.com
Thanks for your time anyway :) Good luck with that issue! Hope it's a minor one :)
Reply all
Reply to author
Forward
0 new messages