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

(10535)

2D

(274)

Ads

(52)

AI & Navigation

(78)

Analytics

(125)

Animation

(390)

Asset Store

(333)

Asset Store Publisher

(10)

Assets

(536)

Audio

(176)

Cloud Build

(139)

Collaborate

(57)

Docs & Tutorials

(238)

Editor

(2459)

Everyplay

(15)

Game Performance Reporting

(15)

General

(953)

Graphics

(861)

GUI

(423)

Input

(166)

Licensing

(88)

Networking

(185)

Physics

(380)

Platforms

(438)

Profiling & Optimization

(81)

Runtime

(180)

Scripting

(1148)

Terrain

(168)

WebGL

(141)