Exemplo n.º 1
0
    public void onBtnCreate()
    {
        CreateClub create = GameObject.Find("PCreateClub").GetComponent <CreateClub>();

        create.UpdateEvents += refresh;
        create.enter();

        mPopup.SetActive(false);
    }
Exemplo n.º 2
0
        public static async Task <HttpResponseMessage> CreateClub(CreateClub createClub)
        {
            var         content           = new MultipartFormDataContent();
            HttpContent fileStreamContent = new StreamContent(createClub.ClubPhoto);

            fileStreamContent.Headers.ContentDisposition =
                new ContentDispositionHeaderValue("form-data")
            {
                Name = "clubImage", FileName = "club-main-photo.jpg"
            };
            fileStreamContent.Headers.ContentType = new MediaTypeHeaderValue("application/jpeg");
            content.Add(fileStreamContent, "clubImage");
            AddStringContent(content, createClub);

            return(await _httpClient.PostAsync(ApiConstants.CreateClubEndpoint, content));
        }