Skip to content

Storage table insert_entity should have an echo_content option #5

@crwilcox

Description

@crwilcox

Description:

Controls whether the service returns the entity that was added or not.

It's the 'prefer' header: https://msdn.microsoft.com/en-us/library/azure/dd179433.aspx

Original Issue: Azure/azure-sdk-for-python#381

Comments (4):

@coffenbacher commented on 2015-07-03 16:19:22:

Yes, just came here to add this issue! It definitely should =) I'm getting hammered with those responses.

@coffenbacher commented on 2015-07-03 17:55:37:

I spent quite some time trying to implement this myself (for batch requests specifically), but no luck. I keep getting 201 responses with the echo, even though my requests look (I think) exactly like the examples here (https://msdn.microsoft.com/en-us/library/azure/dd894038.aspx).

--changeset_dc541eaa-21a8-11e5-a70f-0242ac110b34
Content-Type: application/http
Content-Transfer-Encoding: binary

POST http://xxx.table.core.windows.net/xxxHTTP/1.1
Content-ID: 1
Content-Type: application/atom+xml;type=entry
Prefer: return-no-content
Content-Length: 732

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom" >
<title /><updated>2015-07-03T17:28:03.937876+00:00</updated><author><name /></author><id />
<content type="application/xml">
    <m:properties xml:space="preserve">xxx</m:properties></content></entry>

returns 201, along with the associated body echo

ipdb> p responses[0].status
201

@huguesv commented on 2015-07-08 01:37:41:

Yeah, sometimes it's a lot harder than it should be :(
Is it behaving the same in non-batch mode?

@emgerner-msft commented on 2015-07-08 16:53:22:

Could you provide not just the headers for the changeset entry, but for the batch operation as a whole? If you see the document on Prefer Headers, the request service version must be above 2013-08-15 and the request OData data service version above 3.0 which would be one of the first things to check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions