needs to call my PHP endpoint using a GET request
# support
c
Hey team I’m setting up a function tool that needs to call my PHP endpoint using a GET request, but I can’t find any option in the UI to change the HTTP method (and the JSON editor is locked). Is there a way to force a GET request for function tools, or does Vapi default to POST automatically? custom tool id 7fd214bc-f1de-4d41-99f1-ab849c4a08cf Thanks!
l
Hey, likely no way to do a GET request mate. There is a huge POST body of data on function calls. You need to change your endpoint. TBH, makes no sense that you are using PHP and can only handle GET requests?
you'd never be able to pass the data that is in the POST request via GET using query params. you'd hit a limit on GET request size.
c
Hi Chris, For function tools, Vapi defaults to using POST for HTTP requests. Unfortunately, there isn't an option to change this to GET through the UI at the moment. If you require data retrieval via GET, an alternative approach would be to handle this within your endpoint by accepting POST requests and routing them accordingly. If you have specific use cases that necessitate GET requests directly from Vapi tools, you might consider implementing an intermediary service to convert POST calls to GET for those requests.
2 Views