Search Feedback

20
votes

No POST method for UnityWebRequestTexture

Networking

-

-

Hi, currently, the WWW class (in some forums a Unity Developer said that UnityWebRequest is the future), has an option to call an HTTP with a POST method, and get a texture from the call. Since I want to be up to date with Unity, I tryed to update my code to be the "newest" it could be, but I found that UnityWebRequestTexture doesn't have an option to call HTTP with POST method, only with GET.

Is this feature being worked on?

Thanks!

Comments (2)

  1. 0c48a44d559b885644d08c20b3351178?d=mm

    Aurimas-Cernius

    Apr 27, 2018 09:49

    UnityWebRequestTexture.GetTexture is simply a shortcut that sets method to GET and assigns DownloadHandlerTexture. You can simply add one extra line:
    webRequest.method = UnityWebRequest.kHttpVerbPOST;
    and you get the desired result.

  2. Dea4e099a98d852488fec98a45cb747e?d=mm

    mahmoud93p

    Feb 04, 2018 15:53

    Try this version "unity 2017.2.1f1" & make sure backup your project .

Your opinion counts

Help us make things better. Share your great idea for improving Unity or vote for other people’s.

Log in to post a new idea

Categories

All

(9911)

2D

(260)

Ads

(50)

AI & Navigation

(77)

Analytics

(115)

Animation

(366)

Asset Store

(271)

Assets

(510)

Audio

(169)

Cloud Build

(122)

Collaborate

(45)

Docs & Tutorials

(217)

Editor

(2293)

Everyplay

(13)

Game Performance Reporting

(16)

General

(890)

Graphics

(821)

GUI

(397)

Input

(157)

Licensing

(84)

Networking

(176)

Physics

(362)

Platforms

(427)

Profiling & Optimization

(76)

Runtime

(171)

Scripting

(1097)

Terrain

(164)

WebGL

(138)