Skip to content

POST to a dynamic absolute URL does not work (but works with Apache HttpClient) #3908

Open
@mzattera

Description

@mzattera

I need to POST to an URL like https://xxxx.eu-west-1.aws.endpoints.huggingface.cloud (Hugging Face Inference Endpoint), however if I use the below API definition:

	@POST
	Single<String> myMethod(@Url @NonNull String url, @Body MyRequest req);

and I call

       String resp = myMethod("https://xxxx.eu-west-1.aws.endpoints.huggingface.cloud", req);

Retrofit POSTs to https://xxxx.eu-west-1.aws.endpoints.huggingface.cloud/ which does not work (notice the trailing /).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions