If-modified-since-version not working as expected

25 views
Skip to first unread message

Nauzad Kapadia

unread,
Dec 19, 2015, 8:41:51 PM12/19/15
to zotero-dev
I am trying to detect wither a single item has been modified since it was last cached by my application. My understanding is that if i make a request as follows -

https://api.zotero.org/users/2763179/items/ABCD2345

with a request header as follows -

If-modified-since-version : 2

It should return a 304 - not modified status code.

However instead, what i get back is the item with a 200 status code as shown below.

{
"key": "ABCD2345",
"version": 2,
"library": {
"type": "user",
"id": 2763179,
"name": "nauzadk",
"links": {
"alternate": {
"href": "https://www.zotero.org/nauzadk",
"type": "text/html"
}
}
},

In the above output, i can see that the version of the item is "2". Am i not using this feature as expected or is there something else that is going wrong?

Thanks in advance.

Regards,
Nauzad.    

Dan Stillman

unread,
Dec 19, 2015, 10:59:13 PM12/19/15
to zoter...@googlegroups.com
On 12/19/15 6:47 PM, Nauzad Kapadia wrote:
> I am trying to detect wither a single item has been modified since it
> was last cached by my application. My understanding is that if i make
> a request as follows -
>
> https://api.zotero.org/users/2763179/items/ABCD2345
>
> with a request header as follows -
>
> If-modified-since-version : 2
>
> It should return a 304 - not modified status code.
>
> However instead, what i get back is the item with a 200 status code as
> shown below.

It doesn't look like If-Modified-Since-Version is currently supported
for single-object requests, only for multi-object requests. Sorry about
that — I've updated the docs to reflect this.

We'll try to implement this soon, and I'll announce here before it's live.
Reply all
Reply to author
Forward
0 new messages