Google Cloud Run functions (Python) Python
Kipande cha Python kwa Google Cloud Run functions (Python) kinachojibu maombi ya /pixel.gif kwa empty GIF, ambayo husimbuliwa (decode) mara moja programu inapoanza.
Google Cloud Run functions (Python) Python
import base64
import functions_framework
GIF = base64.b64decode("R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==")
@functions_framework.http
def pixel(request):
if request.path != "/pixel.gif":
return "Not Found", 404
return GIF, 200, {"Content-Type": "image/gif", "Cache-Control": "no-store"}
Tuliendesha kipande hiki na kulinganisha baiti kilizorudisha.
Kagua
curl -sI http://localhost:8080/pixel.gif
Tovuti rasmi: Google Cloud Run functions (Python)