Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(
- function() {
- $.getJSON( 'http://hyonteiset.luomus.fi/insects/rest/authentication?username=abc&password=123' )
- $.ajax({
- url: 'http://hyonteiset.luomus.fi/insects/rest/search/Araneae',
- data: {
- region: 'Oba',
- select: 'DISTINCT family,speciesName'
- },
- dataType: 'json'
- }).done(function( data, textStatus, xhr ) {
- var list = '';
- for ( var i=0; i<data.length; i++ )
- {
- list = list + data[i].family + " " + data[i].speciesName + '<br>';
- }
- $('#result').html( list );
- }).fail(function( xhr ) {
- $('#result').html( xhr.status + ' ' + xhr.statusText + ' ' + xhr.responseText );
- });
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement