-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
rest handler options #708
rest handler options #708
Conversation
Nice.
|
@slnode ok to test |
@slnode test please |
Sure, no problem. I'll get to this as soon as possible.
|
Hey @bajtos, I added the missing jsdoc. About the missing test. I added it as a pending test. I cannot get it to pass unless I change https://github.com/strongloop/strong-remoting/blob/master/lib/rest-adapter.js#L280 to read Any pointers? |
Interesting, I did not realise the options were sourced from IMO options passed trough Other than that, I am ok with changing L280 as part of this patch. |
ok, not as part of this patch, since it is in a different project, but as part of getting this patch landed. Alternatively is there any other option you can use in the test to verify the options object was passed down the line? |
Not that I can think of. The other option that I know of is the recently landed What do you think about releasing a new version of strong-remoting so that I can test against that? |
I'd rather wait with a strong-remoting release until Raymond's changes are landed. However, you can install strong-remoting from github master for the purpose of writing and running the tests. Our CI build uses the latest master revision too, so that the tests will pass there too. That way you can continue the work without having to wait for a strong-remoting release. |
Ok, I'll do that then. |
Added test and squashed commits against current master. |
@bajtos apparently the test is failing because it did not run against strong-remoting's current master. Anything I need to do? |
I just published strong-remoting 2.8.0. @slnode test please |
@bajtos or @raymondfeng do you mind clicking the Restart Build button in Travis? I don't have permission! |
We have two CI servers for strongloop/loopback: a Travis CI and an internal Jenkins-based CI. Travis does not pick strong-remoting master, Jenkins does. |
@slnode test please The Travis build is green: https://travis-ci.org/strongloop/loopback/builds/39525645 |
I am afraid I misunderstood how the remoting options are implemented and gave you a wrong advice on how to implement this whole feature :( At the moment, all other remoting options are read from I don't want to introduce a new inconsistent way of configuring the remoting adapters, thus I have to revert this patch. |
Ok. |
Hello, I'm new using loopback. I don't know where else to ask but how to force API response in json format? |
@masdevid edit your {
"remoting": {
"rest": {
"supportedTypes": ["json", "application/javascript", "text/javascript"]
}
}
} |
Don't forget to update to the latest |
Adds support for options to rest handler. See strongloop/strong-remoting#118 for some background.
/cc @bajtos
/cc @raymondfeng