Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set GET method? #6073

Open
xuhaoguang opened this issue Oct 7, 2023 · 10 comments
Open

How to set GET method? #6073

xuhaoguang opened this issue Oct 7, 2023 · 10 comments

Comments

@xuhaoguang
Copy link

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

@JoanFM
Copy link
Member

JoanFM commented Oct 7, 2023

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
Copy link
Author

xuhaoguang commented Oct 8, 2023

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
Copy link
Author

image

@JoanFM
Copy link
Member

JoanFM commented Oct 8, 2023

how are u defining this hc endpoint?

@xuhaoguang
Copy link
Author

image

@that-rahul-guy
Copy link

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

@JoanFM
Copy link
Member

JoanFM commented Nov 13, 2023

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

@that-rahul-guy
Copy link

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
Copy link

Hey @xuhaoguang, which folder is that file in?

@jina-bot
Copy link
Member

@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 jina-bot added the Stale label Mar 17, 2024
@JoanFM JoanFM removed the Stale label Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants