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
0
votes
1 answer

Handling Ratpack Context.parse execptions

I'm writing an API in Kotlin with the Ratpack framework, using Jackson to deserialize JSON request bodies. When I send an invalid request body, my application throws a 500 internal server error exception: import com.google.inject.Inject import…
0
votes
1 answer

How to inject mocked ratpack client in Groovy spock test

I'm new to Kotlin and Groovy and not sure how feasible it is to achieve this. I have an http client that makes remote calls class MyClient @Inject constructor(private val httpClient: HttpClient, private val config: MyConfig) { fun GetStuff(id:…
Nick
  • 2,877
  • 2
  • 33
  • 62
0
votes
1 answer

ratpack: implementing a custom PublicAddress to force https

I was on a pac4j mail thread discussing why the redirect url ratpack-pac4j uses is using http even when the original page request is served over https. I did some digging and it looks like ratpack-pac4j is using the InferringPublicAddress. This…
voodoogiant
  • 2,118
  • 6
  • 29
  • 49
0
votes
1 answer

Is there a way to work around RatpackPac4j#requireAuth not setting the WWW-Authenticate header?

When testing Pac4j (2.x) authentication in the context of a Ratpack (1.5.x) app, I find that when I use this handler: all RatpackPac4j.requireAuth(HeaderClient) ...Unauthorised requests get rejected correctly with a 401 status, and RFC-7235 states…
wu-lee
  • 749
  • 4
  • 17
0
votes
1 answer

Its possible to bind data between handlers in ratpack, but in once execution?

I'm developing a spring ratpack project, but I want to know if there is any way to bind data between handlers. I tried with registries but I can't find the way that the object only have a value in one execution. I tried to use ratpack session, but i…
0
votes
0 answers

When resolving promises returned by an API call using .then, I get a gateway timeout issue intermittently. How do i avoid it?

Say I have to perform an insert operation on a database, but before that I need to call a function(maybe more than one), that hits a url with the data to be inserted in DB, which returns values that dictate whether the data being held in my app, is…
hisdudeness
  • 438
  • 1
  • 5
  • 15
0
votes
0 answers

How to Pass a Form to a Handler in Ratpack unit test

How do I pass a mocked Form object to a Handler in a unit test? Here's the reference I got so far: https://ratpack.io/manual/current/testing.html https://danhyun.github.io/2016-gr8confus-testing-ratpack-apps/ Here is the code for my Handler: void…
nberms
  • 1
0
votes
1 answer

How are directory listings generated with ratpack?

I've just started looking at Ratpack, and my initial use case to as a simple development server. It seems quite trivial to get it to serve a directory of static files (in Groovy), I paraphrase this article: #!/usr/bin/env…
wu-lee
  • 749
  • 4
  • 17
0
votes
1 answer

JVM bind error when adding Ratpack to spring boot application

I have existing spring boot application. I want to enable ratpack support in the spring boot application. I am adding ratpack springboot depenendency and @EnableRatpack annotation and then starting the application. I am getting following exception.…
somename
  • 978
  • 11
  • 30
0
votes
1 answer

How can I bind configuration from a ServerConfig block in Ratpack groovy?

I am trying to merge server and database configuration using the ServerConfig block in ratpack.groovy but postgresConfig is null when trying to create the datasource. PostgresConfig.groovy @Compile Static class PostgresConfig { String user …
James Allman
  • 40,573
  • 11
  • 57
  • 70
0
votes
1 answer

How to use ConfigData in ratpack.groovy?

I am trying to follow along with the example Ratpacked: Using PostgreSQL Database but I get the error 'of' in 'ratpack.config.ConfigData' can not be applied to '(groovy.lang.Closure)' in IntelliJ IDEA. ratpack { …
James Allman
  • 40,573
  • 11
  • 57
  • 70
0
votes
1 answer

Xml content length issue in the post method handler of ratpack

In post method handler of ratpack the following is not executed after certain length of xml. Tried changing the content length but it did not work.Any help would be greatly appreciated. Thank you. ctx.request.getBody().then{ body-> …
xxx
  • 11
  • 4
0
votes
0 answers

Error after deploying Ratpack application Heroku

I have a Ratpack application which I am attempting to deploy on Heroku. I am deploying through snap-ci, this says passed when I click to deploy to Heroku. However in my error logs I get this error: 2017-02-12T15:41:19.016616+00:00 app[web.1]:…
N P
  • 2,319
  • 7
  • 32
  • 54
0
votes
0 answers

Run yarn_start as part of gradle build

I currently have a Ratpack application which I am using to pass data via an API to a react app. I found an example online that first does a yarn install and then a yarn build, I now want it to do a yarn start whenever I run ./gradlew run so I don't…
N P
  • 2,319
  • 7
  • 32
  • 54
0
votes
0 answers

Ratpack Jackson (json) render same object but different response format

I'm using RatPack 1.1.1 with Jackson and it renders the same object "Product" differently. The first "Product" within my main object is returned with the attribute "productCode" but for the others for the same product, it returns only an attribute…
GeorgesD
  • 73
  • 1
  • 1
  • 6