# Opinion, should we prefix JAX-RS Path value with a slash ?

DevFeed: [Opinion, should we prefix JAX-RS Path value with a slash ?](<https://devfeed.tech/articles/opinion-should-we-prefix-jax-rs-path-value-with-a-slash-26091.md>)

Original publisher: [Read original article](<https://blog.arkey.fr/tomb/uri_paths_with_trailing_or_leading_slashes/>)

Author: brice.dutheil@gmail.com (Brice Dutheil)

Published: 2018-02-20T00:00:00Z

Content type: opinion

Language: en

Sources: [The Coffee Workshop](<https://devfeed.tech/sources/the-coffee-workshop.md>)

Topics: [HTTP](<https://devfeed.tech/topics/http.md>), [client](<https://devfeed.tech/topics/client.md>), [browsers](<https://devfeed.tech/topics/browsers.md>), [Linux](<https://devfeed.tech/topics/linux.md>)

Tags: [browsers](<https://devfeed.tech/tags/browsers.md>), [http](<https://devfeed.tech/tags/http.md>), [linux](<https://devfeed.tech/tags/linux.md>), [okhttp](<https://devfeed.tech/tags/okhttp.md>), [opinion](<https://devfeed.tech/tags/opinion.md>), [retrofit](<https://devfeed.tech/tags/retrofit.md>), [server](<https://devfeed.tech/tags/server.md>), [standards](<https://devfeed.tech/tags/standards.md>)

## AI overview

This opinion examines whether JAX-RS path annotations should use a leading slash. It explains that JAX-RS treats paths with and without leading or trailing slashes similarly, while Retrofit and OkHttp resolve a leading slash as an absolute URL path, making slash placement semantically significant on the client side.

## Source excerpt

In the past months I have been using extensively the infamous HTTP client OkHTTP, I have been impressed by the will power of committers to respect HTTP standards. My co-workers which have various degrees of knowledge and experience in different language ecosystem work on a server-side application with some JAX-RS endpoints, and this question arose: