POST Method not working for SoftAP in C#

nimeshk
Posts: 6
Joined: Wed Nov 13, 2019 6:37 am

POST Method not working for SoftAP in C#

Postby nimeshk » Wed Nov 13, 2019 7:07 am

Hello,
I am trying to configure my device using SoftAP so I am making a POST request from the app which contains configuration using android app and postman it works but when I try to make post request using ios app(code written is C#). The problem is specific to the RestSharp on Xamarin.iOS/C# platform we receive the Header of the POST request on the device but not the body.
This is received from android app:
POST /wifi HTTP/1.1
Content-Type: application/json; charset=UTF-8
User-Agent: Dalvik/2.1.0 (Linux; U; Android 8.1.0; Nexus 6P Build/OPM7.181205.001)
Host: 192.168.1.1
Connection: Keep-Alive
Accept-Encoding: gzip
Content-Length: 40

{"ssid":"SSID","pwd":"PASSWORD"}

This is received from ios app:

POST /wifi HTTP/1.1
Content-Type: application/json
Host: 192.168.1.1
Content-Length: 40

is there something missing that needs to be done for ios or esp32?

Who is online

Users browsing this forum: No registered users and 204 guests