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)
- When shorten the url, link should be opened in a new window HOT 1
- Removing page template and cleaning up code HOT 2
- PHP 8.4 tests failing HOT 2
- 1.7.2 / valid to / paste lifetime / lease time / always 23 hours HOT 11
- Feature Request: Rephrase the WebAssembly error on unsupported browsers HOT 2
- bs5 file upload too small
- bs5 sourcecode highlighting hard to read
- S3 provider broken in 1.7.2 HOT 2
- bs5 text wrapping in menu bar instead of collapsing HOT 5
- In version 1.7.2, the user-selected expiration is ignored HOT 5
- End-to-end testing with PHP backend and JS Frontend
- Improve JS (Frontend) unit testing coverage HOT 13
- Could not create paste: Error saving paste. Sorry. (1.7.2 and later) HOT 6
- bs5 feedback HOT 8
- "Dark mode" toggle in Bootstrap 5 theme is not syncronised with prefers-color-scheme at start (when dark)
- 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 HOT 1
- Wrong translation for Norwegian popup 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 privatebin.