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

(10883)

2D

(287)

Ads

(57)

AI & Navigation

(81)

Analytics

(130)

Animation

(406)

Asset Store

(363)

Asset Store Publisher

(19)

Assets

(551)

Audio

(185)

Cloud Build

(146)

Collaborate

(67)

Docs & Tutorials

(246)

Editor

(2545)

Everyplay

(17)

Game Performance Reporting

(21)

General

(987)

Graphics

(894)

GUI

(442)

Input

(173)

Licensing

(93)

Networking

(189)

Physics

(387)

Platforms

(445)

Profiling & Optimization

(84)

Runtime

(185)

Scripting

(1141)

Terrain

(174)

WebGL

(142)