Repository: rstudio/vetiver-python (python)

Issue:
handling trailing backslash on prediction endpoints
Currently, on Posit Connect, if you add a trailing backslash-- `connectapi.com/myapi/predict/` rather than `connectapi.com/myapi/predict`-- you get a mysterious error:

```python
ConnectionError: HTTPConnectionPool(host='xxx', port=000): Max retries exceeded with url: myapi/predict (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x2a109ea90>: Failed to resolve 'xxx' ([Errno 8] nodename nor servname provided, or not known)"))
```

right now, there is no url handling in the `vetiver_endpoint` function, but that might be a good place to ensure links are in the correct format. 

FWIW: this error does not occur on a local endpoint or local on Docker

Pull request description:
[BUG] remove trailing backslash
closes #194 

Patch:
diff --git a/setup.cfg b/setup.cfg
index ef3a541..62cd44f 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -31,7 +31,7 @@ install_requires =
     nest-asyncio
     requests
     pins>=0.7.1
-    rsconnect-python>=1.11.0
+    rsconnect-python>=1.8.0
     plotly
     pip-tools
     httpx
diff --git a/vetiver/rsconnect.py b/vetiver/rsconnect.py
index 7c410d2..fc2d597 100644
--- a/vetiver/rsconnect.py
+++ b/vetiver/rsconnect.py
@@ -108,7 +108,6 @@ def deploy_rsconnect(
             app_id=app_id,
             title=title,
             python=python,
-            conda_mode=False,
             force_generate=force_generate,
             log_callback=log_callback,
             image=image,
diff --git a/vetiver/server.py b/vetiver/server.py
index cf7d24b..38cadb2 100644
--- a/vetiver/server.py
+++ b/vetiver/server.py
@@ -370,4 +370,8 @@ def vetiver_endpoint(url: str = "http://127.0.0.1:8000/predict") -> str:
     >>> import vetiver
     >>> endpoint = vetiver.vetiver_endpoint(url='http://127.0.0.1:8000/predict')
     """
+    # remove trailing backslash, if it exists
+    if url[-1] == "/":
+        url = url[:-1]
+
     return url


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index aa4cec2..2c59f4b 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -63,7 +63,6 @@ jobs:
           docker-compose up --build -d
           pip freeze > requirements.txt
           make dev
-          cat requirements.txt
         env:
           RSC_LICENSE: ${{ secrets.RSC_LICENSE }}
           GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
diff --git a/vetiver/tests/test_server.py b/vetiver/tests/test_server.py
index 1f7e107..1992a3c 100644
--- a/vetiver/tests/test_server.py
+++ b/vetiver/tests/test_server.py
@@ -4,6 +4,7 @@ from vetiver import (
     VetiverAPI,
     vetiver_create_prototype,
     InvalidPTypeError,
+    vetiver_endpoint,
 )
 from pydantic import BaseModel, conint
 from fastapi.testclient import TestClient
@@ -117,3 +118,10 @@ def test_complex_prototype(complex_prototype_model):
 
     with pytest.raises(InvalidPTypeError):
         vetiver_create_prototype(response.json())
+
+
+def test_vetiver_endpoint():
+    url_raw = "http://127.0.0.1:8000/predict/"
+    url = vetiver_endpoint(url_raw)
+
+    assert url == "http://127.0.0.1:8000/predict"