Skip to content

Releases: tambapps/hyperpoet

1.4.0

Choose a tag to compare

@tambapps tambapps released this 10 Mar 19:27

Hyperpoet for Marcel

Hyperpoet now has an implementation for Marcel (my own programming language) and Groovy

1.3.1

Choose a tag to compare

@tambapps tambapps released this 13 Sep 18:17

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

Choose a tag to compare

@tambapps tambapps released this 18 Jun 11:09

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 printed

Other 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

Choose a tag to compare

@tambapps tambapps released this 22 Jan 23:55

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 ErrorResponseException so 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

Choose a tag to compare

@tambapps tambapps released this 09 Nov 21:34

Changelog

  • made groovy dependency optional so that there is no conflict when using a different groovy version
  • added annotations for IDE support

1.1.0

Choose a tag to compare

@tambapps tambapps released this 06 Nov 20:26
  • added URL_ENCODED content 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)

1.0.0

Choose a tag to compare

@tambapps tambapps released this 27 Jun 08:38

Bug fixes, and small improvments

0.0.1

Choose a tag to compare

@tambapps tambapps released this 30 May 07:31

First release