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
Currently, if I have 2 endpoints I want to merge into one, all I can do is to loop and create requests:
%w(abc).eachdo |key|
namespacekeydogetdo"hello #{key}"endendend%w(efg).eachdo |key|
namespacekeydogetdo"hello again #{key}"endendend
In the case above, I can't use named namespace (namespace ":key") because it'll take over both request groups.
A nicer way would be to be able to send an array or regexp to namespace or get:
namespace%w(abc)dogetdo"hello"endendnamespace%r[^(?<key>e|f|g)$]do# regexp to support named groupsgetdo"hello #{params[:key]}"endendget%r[^(?<key>h|i|j)$]do"hello #{params[:key]}"end
Kind of aliasing same requests to a single block (also saves memory) for API changes, backward compatibility etc.
The text was updated successfully, but these errors were encountered:
Currently, if I have 2 endpoints I want to merge into one, all I can do is to loop and create requests:
In the case above, I can't use named namespace (
namespace ":key"
) because it'll take over both request groups.A nicer way would be to be able to send an array or regexp to
namespace
orget
:Kind of aliasing same requests to a single block (also saves memory) for API changes, backward compatibility etc.
The text was updated successfully, but these errors were encountered: