Status Code 405 Returned

Hello all,

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?

Thanks!

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.

Hi John,

Looks like my request is working in the connection function editor.

Thanks!

Kate

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.

Hi John,

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!

Hey @kcolwell ,

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?

Hi @k.ober,

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?

Thanks!

Hi again!

I took a look at my successful postman calls and I’m not seeing an allow header. These are the headers I’m seeing:

Does that tell you anything? Thanks!

Hm, interesting. Normally, I think it’s RESTful canon that we receive that header - I think we’ve successfully moved out of my depth :grin:

Let me connect with my colleagues on our API team, and get one of them to reach out ASAP. Updates to follow!

Hi @kcolwell,

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.

Thanks!

Hi @Grant and @k.ober,

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.

Thanks!

Hi @kcolwell,

Great news! Thanks for sharing - we had thought it might be using the incorrect HTTP method.