Relative Content

Tag Archive for asp.netjsondotnet-httpclientx-www-form-urlencoded

sending json packet but with urlencode content type

I’m trying to communicate with a 3rd party API and their specs state the content-type must be application/x-www-form-urlencoded but the body is formatted as json. (yes I tried sending them as a type json and they reject it.) The below sample code works fine setting the content-type to json: (sorry it’s in VB, this is a 20 year old system that I inherited)

sending json packet but with urlencode content type

I’m trying to communicate with a 3rd party API and their specs state the content-type must be application/x-www-form-urlencoded but the body is formatted as json. (yes I tried sending them as a type json and they reject it.) The below sample code works fine setting the content-type to json: (sorry it’s in VB, this is a 20 year old system that I inherited)