Comments (8)
Docs have been updated in the latest commit to explicitly mention how Content-Type
headers are expected to work: c08e8e9
Thanks again for raising this issue, and sorry it was confusing!
from docs.
The web client uses form data as the first example shows... are you maybe omitting Content-Type: application/x-www-form-urlencoded; charset=UTF-8
in the request headers?
from docs.
Ah, that's where the disconnect is, I'm implementing a client library, so I'm expecting API calls to be a standard post request.
If the web client uses a different request format, that should probably be documented on the web client documentation and not in the standard API documentation with all of the other JSON based APIs .
from docs.
Hello! Thanks for pointing this out. @AprilSylph is correct: this endpoint expects Content-Type: application/x-www-form-urlencoded
, not Content-Type: application/json
. Most of the Tumblr API endpoints can accept either, but in some cases, like creating NPF posts, they can only accept one format. We'll update the documentation to make this clearer.
from docs.
But the API currently does support application/json
requests for POST, GET, and DELETE, is that unintentional functionality that will be removed?
from docs.
But the API currently does support
application/json
requests for POST, GET, and DELETE, is that unintentional functionality that will be removed?
No, definitely not. I just meant that we'll be clarifying these different acceptable Content-Type
headers -- application/json
is one of them. 👌 The core problem I think you've uncovered is that not providing the header at all can lead to unexpected behavior, as you saw.
from docs.
Actually, I always provided a header, but for my first attempts it was text/plain
.
I'll update my PR to show both.
from docs.
We'll be pushing an update to the docs soon with a new top level section on valid Content-Type
values across all endpoints that expect body parameters.
from docs.
Related Issues (20)
- How do I work with the versions of the site that still use window.Tumblr (uppercase)? HOT 11
- Private redirect URLs for OAuth2 fail validation HOT 3
- Add avatar image links to the blog.theme object in NPF data HOT 2
- `formatting` and `indent_level` don't seem to work like documented HOT 2
- Localhost redirect URI ignoring port HOT 3
- Endpoints to block (indivual & bulk) & follow blogs do not accept application/json as a payload - Confirmed user error HOT 15
- Reply/Note endpoint not documented? HOT 1
- Avatar URL not returned in /notes endpoint HOT 6
- Unique user identifier HOT 2
- Unable to retrieve information from certain users HOT 4
- Community Labels via API HOT 4
- Audio posts appear wonky on custom themes HOT 2
- API console seems to not work HOT 7
- Can't create access tokens HOT 6
- NPF: `tumblrmart_accessories` only returns the `blue-checkmark` and not other badges HOT 2
- NPF `indent_level` – a no longer supported feature? HOT 3
- V2 API: Blog info call does not return user following information correctly HOT 1
- Tumblr SSO does not work when "Continue with Google" is used HOT 5
- api doc error
- Document Polls API HOT 1
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 docs.