Java https works but C# doesn't for same request -
i'm converting java program send https
post request 3rd party server in internet.
- java program run in pc , works fine , connect server.
- then run c# program. server returns
400 bad request
response. - then use fiddler , compare content of each http request java , c# programs, , both contents same.
- here cannot test using
http
because destination server allowshttps
so i'm guessing can certificate issue of visual studio? have idea such case?
code
i posted code in question java vs c# http request json data
if problem occurring in java version, i'd dismiss certificates cause. in java, certificate problem result in protocol error exception ... not http response code. sending http request https port (or vice versa) wouldn't give http response.
therefore suspect there >>is<< different requests, or request headers.
the other alternatives can think of are:
the server giving responses depending on ip addresses, or depending on whether client certs presented, or something, or
you talking different server or different proxy.
Comments
Post a Comment