Comments (3)
It provides the path to the API endpoint on the same domain. It will only prepend the URL base to the webservers request URI:
Line 514 in ec02afc
Line 173 in ec02afc
Lines 225 to 229 in ec02afc
In the example setup (privatebin.net) the API endpoint is at /
and PHP's JSON serializer chooses to be a bit more strict and escapes the slash (see JSON spec, search for "escape"), hence the url getting encoded as \/?[id]
.
from privatebin.
Is this perhaps for a case where the post API endpoint is different from the get API endpoint?
If not, doesn't the paste poster already know the path of the API endpoint when they are making the post request?
Given the API endpoint (1) (known while making post) and this API (2) I don't see how this URL property adds any new information. The client can construct the full url from those pieces (1,2) of info already. Am I missing something?
Also, when making comments, the "url" returned is currently misleading, yes? Because going to that url doesn't really give back the comment.
from privatebin.
The API endpoint is always the same (including for human visitors - the only difference is the non-default, server side yourls-proxy). The difference lies in the different payloads and HTTP request types.
from privatebin.
Related Issues (20)
- Default Content-Security-Policy blocks bootstrap5 icons HOT 1
- Error saving paste. Sorry. since 1.7.3 (database storage) - don't forget to reset your table paste HOT 1
- Bootstrap(5) and footer feedback (textarea height) HOT 1
- Wrong translation for Norwegian popup HOT 1
- BS5 light-mode as source is hard to read HOT 2
- Change separator # by another character HOT 2
- Bootstrap-dark has ugly style for 'source code' format HOT 3
- pgsql: crash when serice account do not have SELECT right on `pg_catalog.pg_user` HOT 3
- Icons not showing on Firefox when using bootstrap5 HOT 2
- Injecting the SRI via template variables instead of hardcoding them into the templates
- Unable to customise the expiration times except the default ones HOT 2
- Replace usage of strpos with str_starts_with etc.
- Message not shown when attachment is present HOT 2
- Accessibility issues: Focus trapped in textarea, labels for form controls, focus order for "Create" should be last HOT 2
- prout HOT 1
- Button for copy value of paste to clipboard HOT 2
- Better presentation of Markdown in Bootstrap5 HOT 5
- fix the footer at the bottom of the screen HOT 6
- v1.7.4 - Cannot calculate expiration date - 3days HOT 1
- Switch to LONGBLOB instead MEDIUMBLOB for MySQL engine (including MariaDB) HOT 2
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 privatebin.