diff --git a/lib/bootstrapper/runtime/Dockerfile b/lib/bootstrapper/runtime/Dockerfile index 1e188ce..aaa58da 100644 --- a/lib/bootstrapper/runtime/Dockerfile +++ b/lib/bootstrapper/runtime/Dockerfile @@ -5,7 +5,7 @@ RUN echo "Using PGSTAC Version ${PGSTAC_VERSION}" WORKDIR /tmp -RUN pip install requests psycopg[binary,pool] pypgstac==${PGSTAC_VERSION} -t /asset +RUN pip install httpx psycopg[binary,pool] pypgstac==${PGSTAC_VERSION} -t /asset COPY runtime/handler.py /asset/handler.py diff --git a/lib/bootstrapper/runtime/handler.py b/lib/bootstrapper/runtime/handler.py index 5e7f637..dc20419 100644 --- a/lib/bootstrapper/runtime/handler.py +++ b/lib/bootstrapper/runtime/handler.py @@ -6,7 +6,7 @@ import boto3 import psycopg -import requests +import httpx from psycopg import sql from psycopg.conninfo import make_conninfo from pypgstac.db import PgstacDB @@ -58,10 +58,10 @@ def send( headers = {"content-type": "", "content-length": str(len(json_responseBody))} try: - response = requests.put(responseUrl, data=json_responseBody, headers=headers) + response = httpx.put(responseUrl, data=json_responseBody, headers=headers) print("Status code: " + response.reason) except Exception as e: - print("send(..) failed executing requests.put(..): " + str(e)) + print("send(..) failed executing httpx.put(..): " + str(e)) def get_secret(secret_name):