Package com.socrata.api

Examples of com.socrata.api.HttpLowLevel


     * Will issue a simple query, and do spot validation.
     */
    @Test
    public void testSimpleQuery4x4() throws LongRunningQueryException, SodaError, InterruptedException, IOException
    {
        final HttpLowLevel  connection = connect();
        final SodaDdl       sodaDdl= new SodaDdl(connection);

        final SearchResults results =  sodaDdl.searchViews(new SearchClause.NameSearch("Test Data"));
        final String id = results.getResults().get(0).getDataset().getId();
        executeSimpleQuery(connection, id);
View Full Code Here


     * Tests a number of ways to connect using dataset name
     */
    @Test
    public void testSimpleQueryName() throws LongRunningQueryException, SodaError, InterruptedException, IOException
    {
        final HttpLowLevel connection = connect();
        executeSimpleQuery(connection, "TestData");
    }
View Full Code Here

    protected HttpLowLevel connect(final String url) throws IOException
    {
        final Properties testProperties = new Properties();
        testProperties.load(getClass().getClassLoader().getResourceAsStream("TestConfig.properties"));

        final HttpLowLevel httpLowLevel = HttpLowLevel.instantiateBasic(url == null ? testProperties.getProperty(URL_PROP) : url,
                                                                        testProperties.getProperty(USER_NAME_PROP),
                                                                        testProperties.getProperty(PASSWORD_PROP),
                                                                        testProperties.getProperty(API_KEY_PROP),
                                                                        null);
        return httpLowLevel;
View Full Code Here

    public void testSyncMetadataMessup() throws LongRunningQueryException, SodaError, InterruptedException, IOException
    {
        final String name = "Name" + UUID.randomUUID();
        final String description = name + "-Description";

        final HttpLowLevel connection = connect();
        final SodaImporter sodaImporter = new SodaImporter(connection);

        DatasetInfo datasetCreated = sodaImporter.createViewFromCsv(name, description, TEST_NOMINATIONA_CSV, "Name");
        try {
            //Get the ID column
View Full Code Here

    public void testAsyncMetadataMessup() throws LongRunningQueryException, SodaError, InterruptedException, IOException
    {
        final String name = "Name" + UUID.randomUUID();
        final String description = name + "-Description";

        final HttpLowLevel connection = connect();
        final SodaImporter sodaImporter = new SodaImporter(connection);

        DatasetInfo datasetCreated = sodaImporter.createViewFromCsv(name, description, WIDE_CSV, "col0");
        try {
            //Get the ID column
View Full Code Here

    {

        System.setProperty("https.proxyHost", "webcache.mydomain.com");
        System.setProperty("https.proxyPort", "8080");

        final HttpLowLevel connection = connect();

        try {
            executeSimpleQuery(connection, "77tg-nbgd");
            TestCase.fail("webcache.mydomain.com does not exist, so this call should have failed if it was using the set proxy.");
        } catch (ClientHandlerException e) {
View Full Code Here

TOP

Related Classes of com.socrata.api.HttpLowLevel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.