Returning HTML not raw text.
See original GitHub issueAm I missing something?
bash-3.2$ curl cheat.sh/tar
... snip ...
<a href="https://twitter.com/igor_chubin" class="twitter-follow-button" data-show-count="false" data-button="grey">Follow @igor_chubin</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<!-- Place this tag where you want the button to render. -->
<a aria-label="Star chubin/wttr.in on GitHub" data-count-aria-label="# stargazers on GitHub" data-count-api="/repos/chubin/cheat.sh#stargazers_count" data-count-href="/chubin/cheat.sh/stargazers" data-icon="octicon-star" href="https://github.com/chubin/cheat.sh" class="github-button">cheat.sh</a>
<!-- Place this tag where you want the button to render. --><a aria-label="Star chrisallenlane/cheat on GitHub" data-count-aria-label="# stargazers on GitHub" data-count-api="/repos/chrisallenlane/cheat#stargazers_count" data-count-href="/chrisallenlane/cheat/stargazers" data-icon="octicon-star" href="https://github.com/chrisallenlane/cheat" class="github-button">cheat</a>
<!-- Place this tag right after the last button or just before your close body tag. -->
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
</body>
</html>
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
return html for a web server and not plain text in python
-1: Correct answer is "Use an existing web server." This answer should say "As a fall-back, if you insist on doing twice as...
Read more >3 ways to convert HTML text to plain text - DEV Community
3 ways to convert HTML text to plain text · 1) Using .replace(/<[^>]*>/g, '') · 2) Create a temporary DOM element and retrieve...
Read more >Returning Plain HTML From a Spring MVC Controller | Baeldung
Learn how to return HTML from a Spring MVC controller.
Read more >.html() | jQuery API Documentation
This method uses the browser's innerHTML property. Some browsers may not return HTML that exactly replicates the HTML source in an original document....
Read more >Custom Response - HTML, Stream, File, others - FastAPI
Takes some text or bytes and returns an plain text response. from fastapi import FastAPI from fastapi.responses import PlainTextResponse app = FastAPI() ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@yyyc514 Hi Josh!
Now we have a special configuration option,
CHTSH_CURL_OPTIONS
, to specify curl command line options that should be used in cht.sh for making curl calls. In your case it would be:in the cht.sh config file (located at
~/.cht.sh/cht.sh.conf
).Sure. Doesn’t hurt for the binary to be explicit about its user agent.