Comments (9)
Are you sure you are sending parameters as x-www-form-urlencoded
? Unfortunately multipart/form-data
isn't supported.
from api.
No, I was taking whatever the default was. I will try again when I am in
front of a computer. There is still the issue of sending a response that
says "OK" when nothing has been done. I would have expected an error like
"can't find id parameter, is your request x-www-form-urlencoded?"
On Jul 1, 2013 5:28 AM, "Dmitry Krasnoukhov" [email protected]
wrote:
Are you sure you are sending parameters as x-www-form-urlencoded?
Unfortunately multipart/form-data isn't supported.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-20271436
.
from api.
Yep, that seems to work. So the bug is that you say OK when you shouldn't,
not that marking as read doesn't work.
On Jul 1, 2013 5:28 AM, "Dmitry Krasnoukhov" [email protected]
wrote:
Are you sure you are sending parameters as x-www-form-urlencoded?
Unfortunately multipart/form-data isn't supported.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-20271436
.
from api.
Sure, you are right, I've added parameters verification with corresponding error results.
from api.
This was closed over a year ago as fixed. However, I still get 'ok' as result but no error message trying the same command as in the initial post.
from api.
Would you be able to send your code so we can investigate?
from api.
Yes I know, very late to get back 2 years later. having another go at this and is stuck at the same place:
markAsRead(auth: string, id: string) {
const params = {
// output: 'json',
a: 'user/-/state/com.google/read',
i: 'tag:google.com,2005:reader/item/' + id
};
let path = '/reader/api/0/edit-tag';
const contentParams = this.serialize(params);
const itemContentUrl = path + '?' + contentParams;
let response = fetch(itemContentUrl, {
method: 'POST',
headers: new Headers({
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'GoogleLogin auth=' + auth,
}),
});
return response;
}
private serialize(obj: {}) {
var str = [];
for (var p in obj) {
if (obj.hasOwnProperty(p)) {
str.push(encodeURIComponent(p) + '=' + encodeURIComponent(obj[p]));
}
}
return str.join('&');
}
localhost:3000 proxies calls to The Old Reader, works for all other API calls so guess this is not the problem.
from api.
Looks like the params should be in the body, thought I tried that but must have gotten something wrong that time, this code is working:
async markAsRead(auth: string, id: string) {
const bodyParams = {
a: 'user/-/state/com.google/read',
i: 'tag:google.com,2005:reader/item/' + id,
};
let path = '/reader/api/0/edit-tag';
let response = fetch(path, {
method: 'POST',
headers: new Headers({
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
'Authorization': 'GoogleLogin auth=' + auth,
}),
body: this.serialize(bodyParams)
});
return response;
}
from api.
I still think that I should not have gotten OK in my snippet above. Took my some hours to figure this out.
from api.
Related Issues (20)
- Articles reporting text direction as ltr even for rtl feeds HOT 2
- Add bookmarking and premium status to API HOT 1
- Confusion in error syntax: "errors" vs. "error" HOT 1
- OPML Import HOT 2
- New features
- Avoid negative count values HOT 2
- Liking users HOT 3
- Follow / unfollow friends error HOT 1
- Feeds without label HOT 8
- Error getting comments HOT 2
- Mark all as ready time limit issue and improvement
- Duplicate labels in unread counts HOT 5
- Python api wrapper
- Unable to unsubscribe from a feed HOT 2
- HTML is not rendering correctly in Reddit feed list HOT 2
- Cannot create new folder HOT 1
- Get Invoices
- "edit-tag" endpoint does not seem to work
- Add rssguard
- Subscriptions list api issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api.