[Endpoint] Use Endpoint with original link plus ?raw=True instead of use githubusercontent #7448
Replies: 1 comment
-
Thanks for reaching out, but this is essentially a duplicate of the preceding Discussion question in #7435 and I'd point you to that answer
I'm not really sure what you have in mind for this. More than 75% of the characters in the complete badge url come from the url you are providing, which consists of things you control like names of files and directories and the depth of directory nesting. I will share that in general I'm not really phased by concerns/complaints about long badge urls, as these aren't things a user has to remember nor type; they are generated, then copy/pasted, once. That's most often pasted into markdown where very standard techniques like anchor links can be utilized to shift raw urls into more friendly locations within the file. If you're still concerned about that length, then your options would be to shorten the names of your dirs/files in your repo, or set up a more standard Endpoint at a shorter hosted url (e.g. runkit), and have that custom endpoint fetch the content from GitHub using that longer url. However, at the end of the day, as a consumer of the Endpoint badge, you have to include the url to whatever your chosen endpoint is; our badge servers can't just guess what url we should use to retrieve data when when we receive your request for a badge 😉 |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I tried to use Endpoint with original link plus ?raw=True instead of use githubusercontent as below but it throws domain blocked error
githubusercontent result
url=https://raw.githubusercontent.com/lodang1992/test_json/main/bluetooth_stack_features/adv_or_scan_response_constructor_gcc.json
Original link plus ?raw=True result
url=https://github.com/lodang1992/test_json/blob/main/bluetooth_stack_features/adv_or_scan_response_constructor_gcc.json?raw=True
And one more thing about shorten the url of the badge. I just wonder if there is any way we can reduce/shorten length of the URL inside the badge
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions