Discussions
Categories
- 197K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.8K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 556 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.4K SQL Developer
- 296.4K Development
- 17 Developer Projects
- 139 Programming Languages
- 293.1K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 161 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 205 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 474 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
400 bad request DELETE handler application/json request with empty body

Hi
We're in the middle of integrating with a 3rd party's API. One of the their calls expects us to set up a DELETE handler that accepts a paramater in the header but has no body. They are setting the content-type as application/json. It appears that in these circumstances ORDS is failing the calls with "Expected one of: <<{,[>> but got: <<EOF>>". It's expecting at least a {} in the body but getting nothing. There's a link to a very similar post below.
Is this a restriction / issue with ORDS or should the vendor not be setting the header to "application/json" if no body is passed through. I'm being told that they cannot change as many other clients use the API suite so we're at a bit on an impasse. We're on ORDS 20.2
Any advice, workarounds would be appreciated
Thanks
Simon
Answers
-
if you tell us to expect a json doc on the body of the request and then you don't send one, it's going to cause a problem
if you're doing a delete, there's no need to provide a content-type on your request
You're version of ORDS is almost 2 years old now, I'd try 21.4, but I would probably expect the same behavior.
-
Hi Jeff
Thanks for the reply. The problem is it's not our API. It's someone else's (a very large hotel company). They are supplying the content_type in the DELETE request and they say they can't change their API for us ...
I'll get back to them - I might try if the latest version of ORDS if all else fails
Thanks
Simon
-
File a Bug...in the meantime ask if they can amend the request to include an empty json doc in their DELETE requests.
Saying you can't change something is disingenuous - you don't too <> you can't. The very large hotel company should also be engaged to see what can be done. Or put something in the middle to intercept and re-write the request.
-
I would agree with you. I'm a bit of a middle man in this conversation to be honest.
I'll see if we can get some meaningful dialogue opened up with them
Thanks
Simon