# ovok_sdk.http.url

Canonical page: https://docs.ovok.com/python-sdk/reference/http/url

URL path and query encoding.

## join_path() [#join_path]

```python
join_path(*parts: str = ()) -> str
```

Join path parts with single slashes, dropping empty parts and outer slashes.

## path_segment() [#path_segment]

```python
path_segment(value: str) -> str
```

Percent-encode `value` for use as one path segment, including any `/`.

## to_query_string() [#to_query_string]

```python
to_query_string(params: QueryParams) -> str
```

Ovok's encoding: `?a=1&b=x,y`, a list comma-joined and None skipped.

**Returns**

- `str`: The query string with its leading `?`, or `""` when there are no parameters.

## to_search_query() [#to_search_query]

```python
to_search_query(params: QueryParams) -> str
```

FHIR's encoding: a list repeats its key, which FHIR reads as AND; write "a,b" for OR.

**Returns**

- `str`: The query string with its leading `?`, or `""` when there are no parameters.
