right now the get requests consist of a small count of parameters in order to make calls simpler (with pojo's and overridden toString methods).
Proposed Solution
all the %2C and %2F found in the api call are encoded, so take advantage of that.
for example, the tcins could just be given a comma delimited list of the id's as a single String. the page could be sent by its ID (or omitted entirely, this is just an example)
page=%2Fc%2Fk4uyq is what we pass now, it coule be /c/k4uyq
Alternative
just keep it as is, it's working - just more work to maintain
Annotation | Description | Example
-- | -- | --
@Body | Specifies the parameter for the body of the request | @Body String body
@CookieValue | Specifies parameters to be sent as cookies | @CookieValue String myCookie
@Header | Specifies parameters to be sent as HTTP headers | @Header String requestId
@QueryValue | Customizes the name of the URI parameter to bind from | @QueryValue("userAge") Integer age
@PathVariable | Binds a parameter exclusively from a Path Variable. | @PathVariable Long id
@RequestAttribute | Specifies parameters to be set as request attributes | @RequestAttribute Integer locationId
The [Format](https://docs.micronaut.io/latest/api/io/micronaut/core/convert/format/Format.html) annotation can be used together with @QueryValue annotation to format query values.
The supported values are: "csv", "ssv", "pipes", "multi" and "deep-object", where the meaning is similar to [Open API v3](https://swagger.io/docs/specification/serialization/) query parameter’s style attribute.
The format can only be applied to java.lang.Iterable, java.util.Map or POJO with [Introspected](https://docs.micronaut.io/latest/api/io/micronaut/core/annotation/Introspected.html) annotation. Examples of how different values will be formatted are given in the table below:
Format | Iterable example | Map or POJO example
-- | -- | --
Original value | ["Mike", "Adam", "Kate"] | {"name": "Mike", "age": 30"}
"CSV" | "param=Mike,Adam,Kate" | "param=name,Mike,age,30"
"SSV" | "param=Mike Adam Kate" | "param=name Mike age 30"
"PIPES" | "param=Mike\|Adam\|Kate" | "param=name\|Mike\|age\|30"
"MULTI" | "param=Mike¶m=Adam¶m=Kate" | "name=Mike&age=30"
"DEEP_OBJECT" | "param[0]=Mike¶m[1]=Adam¶m[2]=Kate" | "param[name]=Mike¶m[age]=30"
Requirements
[x] api calls are made without manual url encoding
Summary
right now the get requests consist of a small count of parameters in order to make calls simpler (with pojo's and overridden toString methods).
Proposed Solution
all the %2C and %2F found in the api call are encoded, so take advantage of that.
for example, the tcins could just be given a comma delimited list of the id's as a single String. the page could be sent by its ID (or omitted entirely, this is just an example)
page=%2Fc%2Fk4uyq
is what we pass now, it coule be/c/k4uyq
Alternative
just keep it as is, it's working - just more work to maintain
Additional Context
the following is taken from micronaut's docs
Annotation | Description | Example -- | -- | -- @Body | Specifies the parameter for the body of the request | @Body String body @CookieValue | Specifies parameters to be sent as cookies | @CookieValue String myCookie @Header | Specifies parameters to be sent as HTTP headers | @Header String requestId @QueryValue | Customizes the name of the URI parameter to bind from | @QueryValue("userAge") Integer age @PathVariable | Binds a parameter exclusively from a Path Variable. | @PathVariable Long id @RequestAttribute | Specifies parameters to be set as request attributes | @RequestAttribute Integer locationId The [Format](https://docs.micronaut.io/latest/api/io/micronaut/core/convert/format/Format.html) annotation can be used together with @QueryValue annotation to format query values. The supported values are: "csv", "ssv", "pipes", "multi" and "deep-object", where the meaning is similar to [Open API v3](https://swagger.io/docs/specification/serialization/) query parameter’s style attribute. The format can only be applied to java.lang.Iterable, java.util.Map or POJO with [Introspected](https://docs.micronaut.io/latest/api/io/micronaut/core/annotation/Introspected.html) annotation. Examples of how different values will be formatted are given in the table below: Format | Iterable example | Map or POJO example -- | -- | -- Original value | ["Mike", "Adam", "Kate"] | {"name": "Mike", "age": 30"} "CSV" | "param=Mike,Adam,Kate" | "param=name,Mike,age,30" "SSV" | "param=Mike Adam Kate" | "param=name Mike age 30" "PIPES" | "param=Mike\|Adam\|Kate" | "param=name\|Mike\|age\|30" "MULTI" | "param=Mike¶m=Adam¶m=Kate" | "name=Mike&age=30" "DEEP_OBJECT" | "param[0]=Mike¶m[1]=Adam¶m[2]=Kate" | "param[name]=Mike¶m[age]=30"
Requirements
Code of Conduct