Пример #1
0
        internal FlickrClient(IFlickrCallback callback)
        {
            this.callback = callback;
            var adapter = new RetrofitAdapter.Builder()
                          .SetEndpoint(HttpConstants.Endpoint)
                          .SetErrorHandler(new DefaultErrorHandler())
                          .Build();

            service = adapter.Create <IFlickrService>();
        }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        buttonGet.onClick.AddListener(OnGet);
        buttonPost.onClick.AddListener(OnPost);
        buttonPostBody.onClick.AddListener(OnPostBody);
        buttonMultipartFileUpload.onClick.AddListener(OnMultipartFileUpload);
        buttonPatch.onClick.AddListener(OnPatch);
        buttonPut.onClick.AddListener(OnPut);
        buttonDelete.onClick.AddListener(OnDelete);
        buttonPathTest.onClick.AddListener(OnPathTest);
        RetrofitAdapter adapter = new RetrofitAdapter.Builder()
                                  .SetEndpoint("http://httpbin.org")
                                  .Build();

        httpService = adapter.Create <IHttpBinInterface>();
    }