Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Inject URL into Rest Service #171

@Marco9000

Description

@Marco9000

When using a REST service from another project (shared rest implementation) it would be good to be able to set the URL for the service where it is used.

The choice the developer has today is to send the URL as a parameter like the example below which works fine but I would prefer to do it once.
@get("{url}/{domain}/entity")
@accept(MediaType.APPLICATION_JSON)
ResponseEntity getEntity(String url, String domain);

These are two examples on how I would like to do it:

  1. Declaring URL when declaring service
    @restservice(@stringres(R.string.myurl))
    RestService myRestService
  2. adding it to service after it has been initialized
    myRestService.setBaseUrl(theServiceUrl);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions