Hi, I need to convert a cURL string in VB.net but I'm not able. I suppose I create a wrong data string.

This is the cURL working string:

curl -XPOST 'https://app.esendex.it/API/v1.0/REST/sms'

-H 'Content-Type: application/json'
-H 'user_key: MyKey' -H 'Session_key: MySessionKey'
-d '{"message_type": "N", "message": "Hello!", "recipient": ["1234567890"], "sender": "Bill", "returnCredits": true}'

...and this is my code:

Private Sub SendMessage()
Dim webRequest As WebRequest = WebRequest.Create("https://app.esendex.it/API/v1.0/REST/sms")
Dim myReq As HttpWebRequest

Dim myData As String = "{'message_type': 'N', 'message': 'Hello!', 'recipient': '1234567890', 'sender': 'Bill, 'returnCredits': true}"
Dim web As New Net.WebClient
web.Headers.Add(Net.HttpRequestHeader.Accept, "application/json")
web.Headers.Add(Net.HttpRequestHeader.ContentType, "application/json")
web.Headers.Add("user_key", MyKey)
web.Headers.Add("Session_key", MySessionKey)
Dim response = web.UploadString("https://app.esendex.it/API/v1.0/REST/sms", "POST", myData)
Dim jsonResulttodict = JsonConvert.DeserializeObject(Of Dictionary(Of String, Object))(response)

myReq.GetRequestStream.Write(System.Text.Encoding.UTF8.GetBytes(myData), 0, System.Text.Encoding.UTF8.GetBytes(myData).Count)

End Sub
Response give me this error:

The remote server returned an error: (400) Bad Request.

Can someone help me ?