Package org.asynchttpclient

Examples of org.asynchttpclient.Param


                .build();

        assertEquals(request.getUrl(), "http://foo.com/?param1=value1&param2=value2");
        List<Param> params = request.getQueryParams();
        assertEquals(params.size(), 2);
        assertEquals(params.get(0), new Param("param1", "value1"));
        assertEquals(params.get(1), new Param("param2", "value2"));
    }
View Full Code Here


    public void test() {
        ConsumerKey consumer = new ConsumerKey(CONSUMER_KEY, CONSUMER_SECRET);
        RequestToken user = new RequestToken(TOKEN_KEY, TOKEN_SECRET);
        OAuthSignatureCalculator calc = new OAuthSignatureCalculator(consumer, user);
        List<Param> queryParams = new ArrayList<Param>();
        queryParams.add(new Param("file", "vacation.jpg"));
        queryParams.add(new Param("size", "original"));
        String url = "http://photos.example.net/photos";
        String sig = calc.calculateSignature("GET", Uri.create(url), TIMESTAMP, NONCE, null, queryParams);

        assertEquals(sig, "tR3+Ty81lMeYAr/Fid0kMTYa/WM=");
    }
View Full Code Here

TOP

Related Classes of org.asynchttpclient.Param

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.