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
can change GET to POST?[IDEA] #678
Labels
upgrade
New feature or request
Comments
Hey @melfebulu ! Was there a particular reason why you wanted to use |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the feature you'd like
A clear and concise description of what you want to happen. Include any relevant links or screenshots or inspiration.
hello, I check the source code in /src/khoj/interface/web/chat.html
here is use GET but not POST
let url =
/api/chat?q=${encodeURIComponent(query)}&n=${resultsCount}&client=web&stream=true&conversation_id=${conversationID}®ion=${region}&city=${city}&country=${countryName};
I asked gpt,so the answer is :
Retrieving the user input for the query.
Encoding the query content along with other relevant information (such as result count, client type, session ID, and geographical location information, etc.) into the URL's query string.
Using this URL to initiate a network request to the server-side corresponding API endpoint through the browser.
In this process, after receiving this GET request, the server processes it based on the request's parameters and returns the appropriate data.
If you want to change to using the POST method to submit information, you need to modify this part of the logic, create a request body, and then send this request body via a POST request, instead of appending all information in the query string of the URL. One advantage of doing this is that POST requests do not expose data in the URL, making them suitable for sending large amounts of data or sensitive information.
The text was updated successfully, but these errors were encountered: