Skip to content
This repository was archived by the owner on Apr 21, 2020. It is now read-only.
This repository was archived by the owner on Apr 21, 2020. It is now read-only.

Add support (or documentation) for overloads by accept header. #14

Description

@MicahZoltu

It would be great if the following worked and the proper method was called based on what Accept header the caller supplied.

@Path('')
class Controller {
	@GET
	@Path('/getFruit')
	@Produces('application/json')
	async getFruitAsJson(): Promise<Response> {
		const repsonse = new Repsonse();
		response.body = { fruit: "apple" };
		return response;
	}
	@GET
	@Path('/getFruit')
	@Produces('text/plain')
	async getFruitAsString(): Promise<Response> {
		const repsonse = new Repsonse();
		response.body = "apple";
		return response;
	}

If this is currently supported and just undocumented, then consider this ticket a request for documentation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions