andyburke / UnityHTTP

A TcpClient-based HTTP library for Unity.
GNU General Public License v2.0
593 stars 147 forks source link

Single string value PUT/POST #64

Open takealuke opened 8 years ago

takealuke commented 8 years ago

Is there any way to make a "PUT" request with a single string value? I'm using this library to make REST calls to Firebase -- their "PUT" allows (and often requires) writing to an "end node" with a single value (so as not to override data) -- I basically want to do:

curl -X PUT -d '"June 23, 1912"' \
  'https://docs-examples.firebaseio.com/rest/saving-data/fireblog/users/alanisawesome/birthday.json'

As is described in this documentation. (look at the "PUT" section)

I basically want to be able to do something like:

UnityHTTP.Request req = new UnityHTTP.Request ("put",
            getDBUrl("/users/" + uid + "/assessments/" + aid), true);

Notice the bool instead of a HashTable (this could just be a string)