I am trying to post to a tulip table from a separate windows app I am writing. My get requests are returning correctly, but when I try to use post or put requests I am receiving a 405 error code, which typically means that the server knows the request, but the target resource doesn’t support this method. I am able to successfully post to my tables from Postman using the same authentication info, but not from my app.
Has anyone encountered this before? Any tips for moving forward?
Hi @kcolwell, thanks for the question. One follow-up: does this request work when you test it in the connector function editor? This will help me understand if it’s a connector configuration issue or something on the app end.
Are you using any inputs in the URL path? My first guess is that your input on the app end could be breaking the URL, but I could be wrong there.
@kcolwell, would you feel comfortable sharing a screenshot of your connector function with any identifying information scrubbed in the connector editor, or sharing a screenshot of your triggers? You can also DM a screenshot to me if you’re more comfortable with that.
I don’t mind sharing my connector, but I’m not really using it in my app. I probably could have made this more clear. My app is written outside of Tulip, it’s a separate c++ program, but I am trying to save information that it gathers to our Tulip tables. I’m wondering if there are any gotchas I should keep in mind while doing this.
Let me know if sharing my connector would still be helpful. Thanks!
I know Tulip Tables are super rigid when it comes to type validation, and they don’t always error cleanly in these cases. Are you able to confirm that whatever method you’re using in your app isn’t, for example, stringifying everything? I’ve had the Tables API throw 405 errors before when my datetimes are malformed, for example.
If everything’s working in Postman and Connectors, I would suspect that perhaps your app method is applying some secondary operation here.
Additionally, there should be an allow header in the server response; do you see this?
I’ve been suspecting there is something wrong with my request body, I’ll double check all the types. I’ll also take a look for that allow header, not sure I’m seeing that.
Do you know if there’s a preferred content type for the request body? I know the connectors allow for multiple types, but is there maybe one that you recommend?
Would you be comfortable sharing me the snippet of the C++ program you’ve written to hit the API? You could just send it as a .txt file to grant.levy@tulip.co, I’d just need code related to how the request is being structured.
I was actually able to figure it out today! My postman test calls were using text/plain for the content type header, but it looks like application/json is the way to go. If anyone has a similar issue I recommend giving that a try.