Repository navigation
Releases: tambapps/hyperpoet
Releases · tambapps/hyperpoet
Release list
1.4.0
1.3.1
New Features
HttpHaiku perform one-shot requests
You just need to perform one request in your program and don't want to bother instantiating a HttpPoet?
Then HttpHaiku is what you need
Get an url
def todos = HttpHaiku.get("$API_URL/todos", [author: 'someone@gmail.com'])Post data
HttpHaiku.post("$API_URL/todos", contentType: ContentType.JSON, body: newPost)TokenAuthInterceptor
A util interceptor to auto-generate tokens
1.3.0
New features
HttpPoem, a new way to perform HTTP requests with even less code
HttpPoem allows you to perform HTTP request with an HttpPoet as a context.
poet.poem {
def todos = get '/todos', [author: 'au@thor.me']
post '/todos', [title: 'new post', author: 'me@myself.me']
}History: keep track of requests made
The history allows you to retrieve information about past requests/responses
def todos = poet.get "todos"
if (poet.history.last().isSuccessful()) {
process(todos)
} Multipart file requests
Added support of multipart requests
Example
poet.post("/upload-file", contentType: ContentType.MULTIPART_FORM,
body: [file: new FormData(value: new File('some.file'), contentType: ContentType.BINARY)])Major changes
Deprecated PrintingHttpPoet. You should now use the ConsolePrintingInterceptor instead, which does the same thing
poet.addInterceptor(new ConsolePrintingInterceptor(printFullUrl: false))
// now perform your requests, they will be printedOther changes
- added default query parameters
- added RateLimitInterceptor an interceptor waiting for the limit to finish when being rate limited
- unescaped json when printing it
- added error response handlers
1.2.1
Release note:
- added util methods to add OkHttp interceptors
- created JwtAuthInterceptor, an auto-refreshening JWT auth provider
- made PrintingHttpPoet more generic to handle easily more content types than just JSON (see printers)
- implemented OpenApiSpecPoeticInvoker
- re implemented
ErrorResponseExceptionso that response is always properly closed - implemented RFC-7807 Problem error response handler
- [bug fix] [PrintingHttpPoet] printed URL params
- [bug fix] [PrintingHttpPoet] fixed errors when body is not json
1.1.1
1.1.0
- added
URL_ENCODEDcontent type - bumped dependencies
- handled more types for requests
body - added PrintingHttpPoet, a client printing requests and responses (useful for presentations)
- handled custom http requests based on method name and parameter (PoeticInvoker)