Passing Curly brackets in the service provider

I have my service provider below, that makes a post request to the server,`${Config.API_URL}/ride/book/{id}`, data, this.requestOptions).toPromise();

How do I pass this to the server with this curl bracket in this format {id}.
When i do they way it’s displays above, I get server error because it’s not getting the id as required

Characters can be unsafe for a number of reasons. […] Other characters are unsafe because
gateways and other transport agents are known to sometimes modify such characters. These characters are “{”, “}”, “|”, “”, “^”, “~”, “[”, “]”, and “`”.

All unsafe characters must always be encoded within a URL. For example, the character “#” must be encoded within URLs even in systems that do not normally deal with fragment or anchor identifiers, so that if the URL is copied into another system that does use them, it will not be necessary to change the URL encoding.

The { symbol should be replaced with %7B and } with %7D.${Config.API_URL}/ride/book/{id}), data, this.requestOptions).toPromise();

Thanks for the clarification.
I did as instructed but the problem is persistent… Same error

Wouldn’t you also want to use


Instead of


Or are you saying you literally want to include the brackets as part of the parameters you’re sending?
If so, maybe placing quotations around {id} would work. I’m not highly versed in string literal syntax, so that’s a shot in the dark

I don’t want to pass the Curls { } but just the value in the curls which is supposed to be the item_id for instance, but the value after several attempts can’t still pass.

Have you tried that? Assuming you stick with string literal syntax.

`${Config.API_URL}/ride/book/` + `${id}`

As a last resort