How to send an image from RASPBERRY PI to GEOSERVER with WCS request?

My image is in raspberry PI , Geoserver is in a client system. I want upload the image from raspberry PI to Geoserver using HTTP POST. I have read lot of documentations but everything says how to retrieve data.

With WCS request I have tried like this but no response:

from owslib.wcs import WebCoverageService
from owslib.coverage import Coverage
import gdal

# Open the image file
ds = gdal.Open('/home/pi/Desktop/Camera Module/image.jpg')

# Get the bounding box
xmin, xres, xskew, ymax, yskew, yres = ds.GetGeoTransform()
xmax = xmin + (ds.RasterXSize * xres)
ymin = ymax + (ds.RasterYSize * yres)
bbox = (xmin, ymin, xmax, ymax)
print('Bounding box:', bbox)

# Get the size
size = (ds.RasterXSize, ds.RasterYSize)
print('Size:', size)

# Close the image file
ds = None


# Connect to GeoServer WCS service
wcs = WebCoverageService('http://ipadddress:port/geoserver/wcs', version='2.0.1')

# Define the coverage
bbox = bbox# longitude, latitude coordinates
size = size  # image size in pixels
crs="EPSG:4326"  # coordinate reference system
coverage = Coverage('myimage', bbox, crs, size)

# Send the image
response = wcs.getCoverage(identifier="myimage", format="image/tiff", coverage=coverage)
with open('myimage.tiff', 'wb') as f:
    f.write(response.read())

Read more here: Source link