feedbin / feedbin-api

Feedbin API Documentation
349 stars 26 forks source link

Document missing Content-Type headers for deleting unread entries #72

Closed third774 closed 1 year ago

third774 commented 1 year ago

I've tried both methods via curl and get 200's with both, but no response body and the entries is still "unread":

❯ curl -i -u "example@example.com:password" -X POST -d '{"unread_entries": [4250066805]}' https://api.feedbin.com/v2/unread_entries/delete.json
HTTP/1.1 200 OK
date: Mon, 23 Oct 2023 04:50:58 GMT
content-type: application/json; charset=utf-8
content-length: 4
x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
etag: W/"74234e98afe7498fb5daf1f36ac2d78a"
cache-control: max-age=0, private, must-revalidate
x-runtime: 0.011405
strict-transport-security: max-age=63072000
x-feedbin-request-id: 883E2FA1:E2D4_0A070016:01BB_6535FBB2_2C9698:41B4A
server: Feedbin

null%                                                                                                                                                          
❯ curl -i -u "example@example.com:password" -X DELETE -d '{"unread_entries": [4250066805]}' https://api.feedbin.com/v2/unread_entries.json
HTTP/1.1 200 OK
date: Mon, 23 Oct 2023 04:51:04 GMT
content-type: application/json; charset=utf-8
content-length: 4
x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
etag: W/"74234e98afe7498fb5daf1f36ac2d78a"
cache-control: max-age=0, private, must-revalidate
x-runtime: 0.011506
strict-transport-security: max-age=63072000
x-feedbin-request-id: 883E2FA1:E2D5_0A070016:01BB_6535FBB8_2C9780:41B4A
server: Feedbin

null%                                                                                                                                                          
❯ curl -i -u "example@example.com:password" -X GET https://api.feedbin.com/v2/unread_entries.json
HTTP/1.1 200 OK
date: Mon, 23 Oct 2023 04:51:24 GMT
content-type: application/json; charset=utf-8
content-length: 232
vary: Accept-Encoding
x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
etag: W/"ad8e29641e72bd562d986582922e1cc2"
cache-control: max-age=0, private, must-revalidate
x-runtime: 0.011134
strict-transport-security: max-age=63072000
x-feedbin-request-id: 883E2FA1:E2D6_0A070016:01BB_6535FBCB_2C99FD:41B4A
server: Feedbin

[4149013560,4191474777,4226860232,4226913314,4228821773,4230924031,4233992214,4234645459,4235413243,4236801063,4241174934,4242196364,4242757020,4245188776,4245923996,4248629406,4249791787,4250066805,4250853875,4253803294,4255020831]%       

Am I doing something wrong, or is this not working?

benubois commented 1 year ago

I think these are missing a Content-Type: application/json header.

third774 commented 1 year ago

Sure enough, that worked! Leaving this ticket open for the docs fix. Thanks for the quick response! 🙏🏻

benubois commented 1 year ago

Great!

this info is already in the docs. Please feel free to make a pull request if you have an improvement in mind.