After trying Paw3 for a while, I found it's really amazing, but I have some little issue about the operation:
How can I bulk edit HTTP headers instead of editing in a table one by one?
How can I fold some of the JSON text code when response is too long?
When I search in the response, is there any way to show the number of the matches?
Many thanks.
Thanks for the kind words about Paw!
Unfortunately, none of the 3 things you've asked are already implemented.
How can I bulk edit HTTP headers instead of editing in a table one by one?
There's no ability to bulk-edit headers yet. Instead, we recommend users to use environment variables as reusable presets. We'd like to later add a batch-edit feature.
How can I fold some of the JSON text code when response is too long?
There's no way to fold JSON texts yet. You could use the regular JSON tree if you need to fold items. Same here, it's something we'd like to add to the text too.
When I search in the response, is there any way to show the number of the matches?
Not displayed. It would be easy to add though. I take note :)
Related
I'm going to need to display a list of results as a response from a telegram bot I'm working on, and was wondering what's the best way of doing that...
I could "calculate" the amount of spaces I need to make it look semi-normal, but I'd rather have a better solution, if there is one.
Thanks!
So, the closest solution I could find is using "pre" inside the bot message (assuming it has parseMode=html), since the characters are all the same width.
I won't be using it eventually, but that's my 2 cents..
i prefer generating HTML table as file and then convert it to an image with some tools, and finally send the image to user by sendPhoto method.
by this method i can create a beautiful colored table with many options...
I have used a PHP library to generate a tabular structure, then used <pre> tag to keep the spacing as it is as suggested by trueicecold
I am currently replacing some functionality in a twiki page that has been pulling data from a DB using the DBI_QUERY feature and generating a table complete with hyperlinks on one of the table columns. Is there a way to generate a similar table from a comma separated file pulled from an HTTP request that twiki makes when the page is loaded? Alternatively, I can pull the data as JSON.
Thanks,
SetJmp
Answer is: apparently not.
However, using an iframe one can implant a table if the GET is already pre-formatted appropriately.
Will look forward to better answers...
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
When do you use POST and when do you use GET?
I know the basic difference between GET and POST methods. That is we can see the URL parameters in case of GET and can't see the URL parameters in case of POST. Of course we can pass huge amounts of data by POST which is not possible through GET.
Are there any other differences between these two methods ?
GET is for data retrieval only. You can refine what you are getting but it is a read only setup and yes, as you mentioned anything used for refinement are part of the URL.
POST is meant for sending data, but is generally a way to 'break' the simple workings of HTML because you are neither guaranteed of anything that is happening, it can just fetch data, send data or delete data.
There are also PUT and DELETE in the HTML standards, but its all about finding web servers that support these actions as well. As the names imply PUT sends data for either the creation or updating while DELETE is for removal of data.
Enjoy! :)
Other implementation differences in GET and POST:
they have different encoding schemes. multipart/form-data is for POST only
the result of POST may not result in an actual page.
url limit necessitates use of POST
If you are using HIDDEN inputs in form then submitting a GET request reveals those inputs
It could be a project well beyond my skills right now but I've got around one full month to spend on it so I think I can do it. What I want to build is this: Gather news about a specific subject from various sources. Easy, right? Just get the rss feeds and display them on a page. Well, I want something more advanced: Duplicates removed and customized presentation (that is, be able to define/change the format in which the news headlines are displayed).
I've played a bit with Yahoo Pipes and some other tools and I am facing two big problems:
Some sources don't provide rss feeds. How do I create one?
What's the best method to find and remove duplicates. I thought about comparing the headlines and checking if there is a matching bigger than, say, 50%. Is that a good practice though?
Please add any other things (problems, suggestions, whatever) I might not have considered.
Duplication is a nasty issue. What I eventually ended up doing:
1. Strip out all HTML tags except for links (Although I started using regex, I was burned. I eventually moved to custom parsing to remove tags)
2. Strip out all whitespace
3. Case-desensitize
4. Hash all that with MD5.
Here's why you leave the link in:
A comment might be as simple as "Yes, this sucks". "Yes, this sucks" could be a common comment. BUT if the text "this sucks" is linked to different things, then it is not a duplicate comment.
Additionally, you will find that HTML tag escaping is weird with RSS feeds. You would think that a stray < would be double-encoded: (I think)&<;
But it is not. It is encoded <
But so too are HTML tags! :<p>
I eventually copied all the known HTML tags as parsed by Mozilla Firefox and manually recognized those tags.
Creating an RSS feed from HTML is quite nasty and I can only point you to services such as Spinn3r, which are fantastic at de-duplication and content extraction. These services typically use probability-based algorithms that are above me. I know of one provider that got away with regexing pages (They had to know that a certain page was MySpace-based or Blogger-based) but they did not perform admirably.
You might want to try to use the YQL module to scrape a webpage that doesn't provide RSS. Here's a sample of a YQL statement to scrape HTML.
About duplicates, take a look at this pipe.
Customized presentation: if you want it truly customized you'll have to manipulate the pipe results yourself, e.g. get it as JSON an manipulate it with Javascript, or process it server-side.
We got a long-running website where XSS lurks. The problem comes from that some developers directly - without using HtmlEncode/Decode() - retrieve Request["sth"] to do the process, putting on the web.
I wonder if there is any mechanism like HTTPModule to help us HtmlEncode() all the items in a Http request to avoid XSS to some extent.
Appreciate for any suggestion.
Rgds,
Ricky
The problem is not retrieving Request data without HTML-encoding. In fact that's perfectly correct. You should not encode any text until the final output stage when you spit it into an HTML page.
Trying to blanket-encode incoming parameters, whether that's HTML-encoding or SQL-encoding, is totally the wrong thing. It may hide XSS holes in your app but it does not fix them. You will still have a hole if you output content that hasn't come from parameters, or has been processed since then. Meanwhile the automatic encoding will fill your database with multiply-escaped &amp;amp;amp;amp;amp; crud.
You need to fix the output stage, that's where the problem lies.
Like bobince said, this is an output problem, not an input problem. If you can isolate where this data is being output on the page, you could create a Filter and add it to the Response object. This filter would isolate the areas that are common output and then HtmlEncode them.