Such thing as a dummy REST server to test HTTP requests? [closed] - http

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have been searching around but cannot find any site like this. I want to know if there is some dummy server that will respond to test GET requests and return a JSON object? Basically something like:
HTTPUtil.httpGet("http://www.ipsumlorem.com/json");
and have it return filler text JSON objects like:
{
"title" : "Ipsum Lorem",
"content" : "blah blah blah"
}

http://www.jsontest.com/ will be your new best friend I guess...
Try this out for your need: http://echo.jsontest.com/title/ipsum/content/blah
It will return this:
{
"content": "blah",
"title": "ipsum"
}

You can use also www.mocky.io, where you mock your HTTP responses to test your REST API.
It is possible to change also the headers of the response and of course to write precisely the content (including json...)

For following tutorials and giving workshops this could be useful as well:
http://jsonplaceholder.typicode.com

You can use http://apiary.io to create mock REST APIs very quickly.
If you don't care about the Content-Type it is even faster if you put a plain text file in Dropbox.

You could use SoftwareMill's TestServer: https://github.com/softwaremill/softwaremill-common/tree/master/softwaremill-test/softwaremill-test-server

Related

SABRE REST API FULL SCHEMA DOCUMENTATION [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am doing some tests with SABRE API, particularly the Advanced Calendar Search and this search returns quite a lot of objects.
When I try to understand the schema of these returned objects on the model definition at the lower part of the page it just shows: "Please see full specification in json schema and json schema description files - API resources". So, where can I check this full specification for the returned json object?
We can see the details in Example value or we can download yaml file(link is placed in top of the page) and convert to json file.

IEmailSender - library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Improve this question
What library i need for IEmailSender in asp.net mvc 5 ?
This is how code looks like:
public class PasswordResetHelper
{
private IEmailSender emailSender;
public PasswordResetHelper(IEmailSender emailSenderParam)
{
emailSender = emailSenderParam;
}
public void ResetPassword()
{
// ...call interface methods to configure e-mail details...
emailSender.SendEmail();
}
}
I take that code from a book for mvc 5 but it didn't work.
What i do wrong ?
P.S. Sorry for bad english.
You seem to be looking for a piece of code that will send emails for you. This isn't in that book.
The code you show is in a chapter that's titled "Building Loosely Coupled Components":
[...] one of [the] most important features of the MVC pattern is that it enables separation of concerns. [...] A simple example will help put things in context. If we were writing a component called MyEmailSender to send e-mail messages [...]
Emphasis mine.
They're trying to teach you the concept of building good, maintainable, testable software through separation of concerns and dependency injection.
If you're just looking for copy-pasteable code to implement an email sending class, you've bought the wrong book.
If all you're looking for is code to send an email, see How to send email in ASP.NET C#.

What are the allowed characters in a css property and a css value [duplicate]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Is there a library out there which will validate CSS?
The only tools I can find to do so are web sites. If one of these sites has an API, that would fit the bill, too.
I have a script that serves as a CSS compiler. It sets various variables according to settings for a theme, and generates and writes a CSS file. Before committing to writing the CSS file, I'd like to validate it to make sure there aren't any invalid entries.
PHP would be convenient, but Python, Perl, Ruby, Java, or anything executable from a shell would be fine.
Ideally, there's something out there that I can use as part of a sequence like:
$css_file=theme_compile('theme-name');
if(!validate_css($css_file)){
echo "css file contained invalid entry 'width:px'";//just an example, of course
}
else{
file_put_contents('/path/css_file',$css_file);
}
W3C has an API:
http://jigsaw.w3.org/css-validator/api.html
You can also download the validator and run it locally:
http://jigsaw.w3.org/css-validator/DOWNLOAD.html
You need to be able to run java from your script.
Python library:
http://cthedot.de/cssutils/
There is a pear package called Services_W3C_CSSValidator which does this.
You can download the PHP class directly from the github if you prefer.
Its very simple to use.
require_once 'Services/W3C/CSSValidator.php';
$v = new Services_W3C_CSSValidator();
$result = $v->validateFile('pear_manual.css'); // XML
It includes all features available at http://jigsaw.w3.org/css-validator

Malware infected sites list(only URL) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I want malware infected sites list (only URL's) any pointers ?
Found some but they don't have option to download the list.
Some sites are:
http://malc0de.com/database/
http://www.malwareblacklist.com/showMDL.php
Copying each and every url from these list is not possible.
Any pointers towards these is appreciated.
Here you can find aome lists of malware infected urls:
http://www.hosts-file.net/
http://www.malwaredomainlist.com/
https://github.com/chrisaljoudi/uBlock/issues/1406#issue-80697212 (by Disconnect)
List of lists: https://zeltser.com/malicious-ip-blocklists/
Also take a look at that question: https://security.stackexchange.com/questions/32058/looking-for-url-blacklists-of-malicious-websites
isc.sans.edu have text-file lists of suspicious and/or risky domains. Most of the sites there use javascript or java attacks, I've only checked out a few, so there might be more interesting things in there.
I know this is old question, but anyone coming here to look for answer can benefit from this new API google published to check a updated list of websites https://developers.google.com/safe-browsing/?hl=en

Dictionary text file [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
This post was edited and submitted for review 6 months ago and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
I am writing a program that needs a list of English words as a source file for it to work. I realise that these source files are available for students writing games such as Hangman or Crossword solvers but I am having trouble locating such a source file and wonder if anyone knows how I can attain one without slowly scraping websites and building up a dictionary manually.
What about /usr/share/dict/words on any Unix system? How many words are we talking about? Like OED-Unabridged?
For an English dictionary .txt file, you can use Custom Dictionary.
You can also generate a list aspell or wordlist with own settings.
Also you can take a look at http://wordlist.sourceforge.net/
Only english words: http://www.math.sjsu.edu/~foster/dictionary.txt
Also take a look at:
http://wordlist.sourceforge.net/
http://www.math.sjsu.edu/~foster/dictionary.txt
350,000 words
Very late, but might be useful for others.
There's also WordNet. Its data files format are well-documented.
I used it for building an embeddable dictionary library for iOS developers (www.lexicontext.com) and also in one of my apps.
#Future-searchers: you can use aspell to do the dictionary checks, it has bindings in ruby and python. It would make your job much simpler.

Resources