jina-ai / jina

☁️ Build multimodal AI applications with cloud-native stack
https://docs.jina.ai
Apache License 2.0
21.01k stars 2.21k forks source link

How to set GET method? #6073

Closed xuhaoguang closed 3 months ago

xuhaoguang commented 1 year ago

image This is default POST method, But how can I set it's a GET method?

JoanFM commented 1 year ago

Hey @xuhaoguang ,

You do not need to set it, Jina detects that there is a generator being returned and because of that exposes a GET endpoint when served via HTTP.

xuhaoguang commented 12 months ago

ehh, But how can I use curl "localhost:12345/hc" to health_check method, but when I test, jina say I should send a json post data and Method Not Allowed

xuhaoguang commented 12 months ago

image

JoanFM commented 12 months ago

how are u defining this hc endpoint?

xuhaoguang commented 12 months ago

image

that-rahul-guy commented 10 months ago

@xuhaoguang Did you find any workaround? I'm struggling with same.

JoanFM commented 10 months ago

@that-rahul-guy what are you trying to do?

that-rahul-guy commented 10 months ago

Hi @JoanFM I am currently exploring jina as a framework to serve my LangChain Agent-tool architecture application. As for the GET method I was trying a similar thing what @xuhaoguang shared.

reshma045 commented 9 months ago

Hey @xuhaoguang, which folder is that file in?

jina-bot commented 6 months ago

@jina-ai/product This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days

jina-bot commented 3 months ago

@jina-ai/product This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days