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

(10244)

2D

(266)

Ads

(51)

AI & Navigation

(78)

Analytics

(121)

Animation

(379)

Asset Store

(295)

Asset Store Publisher

(7)

Assets

(524)

Audio

(173)

Cloud Build

(135)

Collaborate

(48)

Docs & Tutorials

(233)

Editor

(2374)

Everyplay

(13)

Game Performance Reporting

(16)

General

(919)

Graphics

(847)

GUI

(413)

Input

(160)

Licensing

(86)

Networking

(181)

Physics

(372)

Platforms

(434)

Profiling & Optimization

(78)

Runtime

(176)

Scripting

(1131)

Terrain

(167)

WebGL

(140)