# Using HF spaces via http request?

**URL:** <https://discuss.huggingface.co/t/using-hf-spaces-via-http-request/110186>\
**Category:** Beginners\
**Created:** [October 5, 2024, 12:50am UTC](https://discuss.huggingface.co/t/using-hf-spaces-via-http-request/110186 "2024-10-05T00:50:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [October 5, 2024, 1:26am UTC](https://discuss.huggingface.co/t/using-hf-spaces-via-http-request/110186/2 "2024-10-05T01:26:14Z")

</div>

I heard that curl can be used, but isn’t it more difficult than Python?  
The get/post request contents of the Python code that uses the **requests** library are mostly raw, so I think it can be used for curl as well.

> [@Can't Access Private Gradio Space API Endpoint Through Postman](https://discuss.huggingface.co/t/cant-access-private-gradio-space-api-endpoint-through-postman/72908):
>
> I am trying to access my Huggingface space through a Postman request. When I copy the exported curl command, it looks like this: curl --location 'https://MY\_SPACE\_NAME\_HERE.hf.space/--replicas/RANDOMDIGITS/' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer hf\_REST\_OF\_MY\_TOKEN\_HERE' \ --data '{"data": ["data:image/jpeg;base64,PIC\_IN\_BASE64\_HERE"]}' But when I run this request, I get: { "detail": "Method Not Allowed" } How do get this request to succeed? Also …

> **[Send Requests to Endpoints](https://huggingface.co/docs/inference-endpoints/guides/test_endpoint)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

---

_[View the full topic](https://discuss.huggingface.co/t/using-hf-spaces-via-http-request/110186)._
