# POST data HTTP

**URL:** <https://forums.fusetools.com/t/post-data-http/6365>\
**Category:** Feature Suggestions\
**Created:** [June 1, 2015, 4:03am UTC](https://forums.fusetools.com/t/post-data-http/6365 "2015-06-01T04:03:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cristian\_Karmy1](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy1/32/480_2.png) [@Cristian\_Karmy1](https://forums.fusetools.com/u/Cristian_Karmy1)\
**Post date:** [June 1, 2015, 4:03am UTC](https://forums.fusetools.com/t/post-data-http/6365/1 "2015-06-01T04:03:09Z")

</div>

Hi, I already Get data from Parse with HTTP request. But I cant Post data or send data with Json. How can Achive something like that?:

```auto
public static string ParseAuthenticate(string strUserName, string 
{
var httpWebRequest = (HttpWebRequest)WebRequest.Create("https://api.parse.com/1/push");
httpWebRequest.ContentType = "application/json";
httpWebRequest.Headers.Add("X-Parse-Application-Id", "my app id");
httpWebRequest.Headers.Add("X-Parse-REST-API-KEY", "my rest api key"); 
httpWebRequest.Method = "POST";
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var responseText = streamReader.ReadToEnd();
return responseText;
}
}

Request body
{
    "channels": [
      "test"
    ],
    "data": {
      "alert": "12345"
    }
  } 

```

---

<div class="post-metadata">

**Author:** ![Anders\_Schau\_Knatten](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_schau_knatten/32/41_2.png) [@Anders\_Schau\_Knatten](https://forums.fusetools.com/u/Anders_Schau_Knatten)\
**Post date:** [June 1, 2015, 5:19am UTC](https://forums.fusetools.com/t/post-data-http/6365/2 "2015-06-01T05:19:34Z")

</div>

If you already have Uno code to do HTTP GET, you simply change the `method` from `GET` to `POST` when calling

`HttpMessageHandler.CreateRequest(string method, string url)`

You can then set headers on the request using

`HttpMessageHandlerRequest.SetHeader(string name, string value)`

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy1](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy1/32/480_2.png) [@Cristian\_Karmy1](https://forums.fusetools.com/u/Cristian_Karmy1)\
**Post date:** [June 1, 2015, 12:36pm UTC](https://forums.fusetools.com/t/post-data-http/6365/3 "2015-06-01T12:36:53Z")

</div>

Thanks! But the only thing that I cant do is to set the content message that I need to send in the POST.

Like the request Body in the example above… Or the -D data in this example (cURL):

```auto
curl -X POST \
  -H "X-Parse-Application-Id: 9kNjUUyxHfXYyYv3Nn0FTilvNMu1VxN01lSRMjDt" \
  -H "X-Parse-REST-API-Key: e4mKPcuQF1icltfET9GLAMKsQsFUPYLpQZoa693s" \
  -H "Content-Type: application/json" \
  -d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \
  https://api.parse.com/1/classes/GameScore

```

Is posible to send jSOn data in the Post? Thanks!

---

<div class="post-metadata">

**Author:** ![Anders\_Schau\_Knatten](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_schau_knatten/32/41_2.png) [@Anders\_Schau\_Knatten](https://forums.fusetools.com/u/Anders_Schau_Knatten)\
**Post date:** [June 1, 2015, 12:51pm UTC](https://forums.fusetools.com/t/post-data-http/6365/4 "2015-06-01T12:51:36Z")

</div>

Here’s an example from an app that I’ve made:

```auto
        var url = (...);
        var payload="{\"channel\": \"" + _channel + "\", \"username\": \"(...)\", \"text\":\"" + message + "\", \"link_names\":1}";
        var request = _handler.CreateRequest("POST", url);
        request.SetResponseType(HttpResponseType.String);
        request.Error += OnError;
        request.SendAsync(payload);

```
