Questions tagged [ratpack]

Ratpack a toolkit for creating high performance web applications built on Java and Netty.

Ratpack is a set of Java libraries that facilitate fast, efficient, evolvable and well tested HTTP applications.

It is built on the highly performant and efficient Netty event-driven networking engine. The API is optimized for Groovy and Java 8.

Optional Google Guice integration provides a foundation for scaling your application in size in a managed way.

Optional Gradle build time support makes building and testing applications a breeze.

Ratpack focuses on allowing HTTP applications to be efficient, modular, adaptive to new requirements and technologies, and well-tested over time.

enter image description here

Ratpack Introduction provides a quick comparison with similar products.

Github

88 questions
1
vote
2 answers

How to perform multiple parallel operations using a single POST API Call?

I have created an API using Ratpack and Groovy. I want a POST API such that the data should be processed and stored in 2 cassandra databases say table-A and table-B. For Now I have this in my Ratpack.groovy, and thus I have to call both the APIs…
tanmayghosh2507
  • 773
  • 3
  • 12
  • 31
1
vote
1 answer

Post API using Ratpack and Groovy giving 405 Error and RxJava methods not working

I am building an API using Ratpack and Groovy. The POST API is always giving: 405-Method not Found Error This is a snippet from POST Endpoint Handler. In this code, promiseSingle, then, observe, map, doOnNext, doOnError, etc. RxJAVA functions are…
tanmayghosh2507
  • 773
  • 3
  • 12
  • 31
1
vote
1 answer

How to get Servlet Filter (before/after) behavior in Ratpack Handler?

I have a Servlet Filter which performs operations before and after the filter chain, something like: public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain){ // I do some stuff here... chain.doFilter(req, res); …
cjstehno
  • 13,468
  • 4
  • 44
  • 56
1
vote
1 answer

Nothing happens when running a simple Groovy Ratpack script

I'm new to groovy and ratpack. I have read that i can simply put my entire application in a file and run it like a simple groovy script groovy filename.groovy. When I run one example script nothing seems to happen and pointing the browser to…
Andrea
  • 335
  • 3
  • 12
1
vote
1 answer

Spock: more details about error

We use ratpack framework for building REST server and spock for testing. I need to tune spock output when condition unsatisfied (eg. stacktrace or response dump) For example, following test: def "Vk: Auth mr. John"() { when: request.param…
ruX
  • 7,224
  • 3
  • 39
  • 33
1
vote
2 answers

Setting the http port for gradle/ratpack on the command line

I am trying to run ratpack (https://github.com/pledbrook/lazybones/tree/master/src/templates/ratpack) using "gradlew run" - this uses a default port, is there a way to set the port on the command line that will be used for http? Something like…
Michael Neale
  • 19,248
  • 19
  • 77
  • 109
0
votes
0 answers

Ratpack/Groovy - read the body of a call

I want to create a "mock" server using Ratpack/Groovy and we need to read the data-raw from a call I haven't had a problem reading headers or parameters, but I need to read the body of a request Examplle: curl --location --POST request…
0
votes
0 answers

Query DynamoDB using Between operator

I have a DynamoDb table with the following structure key reference value 1234 3214#0012345 xxxx 1234 3314#0003455 xxxx 1234 3214#0004231 xxxx The value of reference, is a concatenation like…
0
votes
0 answers

Ratpack: Prefix binding with multiple "components" in past binding

I've got a Ratpack application and I'm trying to configure an endpoint for GET requests which delegates to a handler based on a prefix. However, my URL path may contain multiple slashes, which I'd want to capture and use in my…
helencrump
  • 1,351
  • 1
  • 18
  • 27
0
votes
1 answer

/buildinfo and /health API requests in Ratpack

I am building a micro-service using Ratpack. I have a basic understanding of how requests are routed using chaining in ratpack. But what I can't understand is how my server responds to the "/buildinfo" and "/health" requests when I haven't defined…
0
votes
1 answer

jacocoTest exclusion has no effect

I have a gradle project and I want to exclude some directories from TC coverage. This is what I am giving in the task jacocoTestReport { reports { xml.enabled true csv.enabled false html.enabled true } afterEvaluate { …
Yogi
  • 1,035
  • 2
  • 13
  • 39
0
votes
1 answer

autoEscape is true but Ratpack doesn't escape HTML elements

With Ratpack 1.6.1 I have a gtpl template with a div element as follows: div('
HELLO
') Ratpack doesn't escape the inner pre element even though autoEscape is true. Is there a way to fix/workaround the issue? P.S. autoEscape in…
Dmitry
  • 1
  • 1
0
votes
1 answer

Setting up Spek test for http methods using Kotlin?

How do I spin up a spek test using kotlin to test whether or not an HTTP method post has been called? Whats tripping me out is i'm having trouble mocking up the context. I'd like to pass in a method other then HttpMethod.POST to fire off the else…
sisternight438
  • 153
  • 1
  • 1
  • 12
0
votes
0 answers

SAML2.0 Specification how Response Should be sent

I have connected to two different saml2.0 identity providers. Test IdP https://hub.docker.com/r/kristophjunge/test-saml-idp/ And a Third party idp. I am new to SAML so I may be missing something here. It turns out that the test idp works perfectly…
flexxxit
  • 2,440
  • 5
  • 42
  • 69
0
votes
1 answer

Package ratpack.test does not exist

I have a Gradle, Intellij-idea project and I'm using ratpack. I'm trying to use the ratpack.test library to test my API however it cannot seem to find the ratpack.test package. When compiling it says package ratpack.test does not exist. Gradle:…
A Redfearn
  • 506
  • 5
  • 15