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
{{ message }}
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
While the readme of David lists sinatra as one of the frameworks which are compatible with david, I could not get david to work with sinatra so far.
Adding the david gem (together with cbor) will make rackup talk over coap just as desired. Unfortunately, there is no .well-known/core route to tell the CoAP client what is available.
Also, I can not use the discoverable option in my controller, since the "discoverable" option is depending on the railties.
In order to be compatible with all the other frameworks, there should be a way to make the .well-known/core route available.
Do you have any working example with sinatra and david?
The text was updated successfully, but these errors were encountered:
Since accessing the sinatra routes over CoAP, the workaround is the following:
post '/blub/hallo' do
puts "\n\n\n\n"
puts params.inspect
puts "\n\n\n\n"
'Test Antwort'
end
get '/.well-known/core' do
content_type 'application/link-format'
'</blub/hallo>;sh="/t";n="Hallo",
</blub/zweitertest>;sh="/l";ct=41;n="HalloTest"'
end
Maybe I can add this feature as soon as I get a little deeper into coap and into the internal logic of the david gem.
At the moment, I would prefer just adding a few lines of code to the documentation that describe how to use david with sinatra.
I'm looking at this now from a different point of view: making sure that rspec requests can get from /.well-known/core. I already changed how to link list was created in my pull request. I've submitted issue #10 about this.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
While the readme of David lists sinatra as one of the frameworks which are compatible with david, I could not get david to work with sinatra so far.
Adding the david gem (together with cbor) will make rackup talk over coap just as desired. Unfortunately, there is no .well-known/core route to tell the CoAP client what is available.
Also, I can not use the discoverable option in my controller, since the "discoverable" option is depending on the railties.
In order to be compatible with all the other frameworks, there should be a way to make the .well-known/core route available.
Do you have any working example with sinatra and david?
The text was updated successfully, but these errors were encountered: