Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Orhan Obut
    @orhanobut
    guys we need full unit test for wasp
    Alessandro Balocco
    @AlexBalo
    Where is Yekmer?
    :D
    There he is :)
    Ray Ch
    @iraycd
    Hi, @orhanobut, What is the status of Wasp.Image?
    Orhan Obut
    @orhanobut
    hi, Wasp.Image is working now.
    but currently some todos are still waiting
    Ray Ch
    @iraycd

    How to mock from JSON File?

        @Mock(path="mocks/product/products.json")
        @GET("/products")
        void getLatestProduct(
                CallBack<List<Product>> callBack
        );

    I not able understand how services is implemented.

    Orhan Obut
    @orhanobut
    they are under asset folder right?
    assets
    Ray Ch
    @iraycd
    Yeah. They are under assets folder.
    The example for mock is not clear. I didn't understand or am I missing something?
    Ray Ch
    @iraycd
    Should I include something while Initialize method, like setMock()?
    Orhan Obut
    @orhanobut
    can you add
    Ray Ch
    @iraycd
    My service is something like this.
    
            ProductService productService = new Wasp.Builder(this)
                    .setEndpoint("http://192.168.1.158:8134")
                    .build()
                    .create(ProductService.class);
    
            productService.getLatestProduct(new CallBack<List<Product>>() {
                @Override
                public void onSuccess(List<Product> products) {
                    for(Product product:products) {
                        Log.d("Product",product.getTitle());
                    }
                    Log.d(TAG, "Successful");
                }
    
                @Override
                public void onError(WaspError waspError) {
                    Log.d(TAG, waspError.getErrorMessage());
                }
            });
    Orhan Obut
    @orhanobut
    .setNetworkMode(NetworkMode.MOCK)
    before build()
    Ray Ch
    @iraycd
    Yeah, exactly that is what I was looking for. You didn't include that in any example.
    Orhan Obut
    @orhanobut
    we made some changes, some of them are not in the documentation unfortunately. Really need to update it soon
    Ray Ch
    @iraycd
    I can understand.
    Orhan Obut
    @orhanobut
    did it solve the problem?
    Ray Ch
    @iraycd
    Yeah.
    Ray Ch
    @iraycd
    How do I get Headers on success method with callback?
    Anthony Garera
    @AmGarera
    Where do you initialize the builder/wasp?
    Said Tahsin Dane
    @tasomaniac
    Hi all, I am trying to set a custom certificate with WASP.
    I am getting the following errorjava.io.IOException: Hostname ourhostname.com not verified:
    I saw WASP is setting an EmptyHostnameValidator, and it is supposed to accept all the hostnames.
    What could be the error?
    Said Tahsin Dane
    @tasomaniac
    
            public static Service service = new Wasp.Builder(App.instance)
                    .setEndpoint(Service.BaseURL)
                    .trustCertificates(!BuildConfig.DEBUG ? R.raw.test_cert_2 : R.raw.prod_cert, !BuildConfig.DEBUG ? TEST_KEY_STORE_PASS : PROD_KEY_STORE_PASS)
                    .build()
                    .create(Service.class);
    Here is my implementation.
    I am putting a breakpoint and verify function in SSLUtils.getEmptyHostnameVerifier() function is never called.