Side navigation
#6462 closed bug (fixed)
Opened April 20, 2010 04:23AM UTC
Closed November 02, 2010 01:51AM UTC
Last modified November 02, 2010 02:01AM UTC
MERGE HTTP verb does not submit options.data in an ajax call
Reported by: | neo98052 | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | |
Component: | ajax | Version: | 1.4.2 |
Keywords: | OData MERGE ajax | Cc: | |
Blocked by: | Blocking: |
Description
The MERGE HTTP keyword does not currently submit the payload (options.data) in the call to the ajax method. The OData protocol uses both the PUT and MERGE keywords to enable updating of data.
The issue is on line 5256:
xhr.send(type === "POST" || type === "PUT" || type === "DELETE" ? s.data : null);
If an additional check is added for type === "MERGE", it will enable the scenario.
Attachments (0)
Change History (7)
Changed June 12, 2010 02:23AM UTC by comment:1
component: | unfiled → ajax |
---|
Changed October 28, 2010 09:07PM UTC by comment:2
Odata docs suggest using POST with the .ajax method and sending the MERGE verb via the X-HTTP-Method header.
Here is a link with sample jquery code:
Changed October 28, 2010 10:31PM UTC by comment:3
OData provides this functionality in order to support clients that don't support all of the verbs. However, it requires clients to always implement the beforeSend callback in order to attach the header. As this is the only OData HTTP verb that jQuery does not support, it would be useful if it did fully support it.
Changed October 29, 2010 02:44AM UTC by comment:4
keywords: | OData MERGE ajax → OData MERGE ajax needsreview |
---|---|
milestone: | 1.4.2 |
priority: | → undecided |
MERGE is not a valid HTTP/1.1 verb, so I am not sure why jQuery should go out of its way to support it.
Changed November 02, 2010 01:51AM UTC by comment:6
resolution: | → fixed |
---|---|
status: | new → closed |
Fixed in jQuery 1.4.3; GET and HEAD requests have their
.dataproperty serialized to the URL, but all other verbs send the data as the entity body.
Changed November 02, 2010 02:01AM UTC by comment:7
keywords: | OData MERGE ajax needsreview → OData MERGE ajax |
---|