Click here to Skip to main content
15,610,013 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:

I gave the method to be called by another person through ocelot, you need to insert json to this method


      "DownstreamPathTemplate": "/api/ClientPortalApi/ClientRequest_ISOOFER?contractDate={contractDate}",
      "UpstreamHttpMethod": [ "Get" ],
      "DownstreamScheme": "http",
      "DownstreamHostAndPorts": [
          "Host": "",
          "Port": 80
      "UpstreamPathTemplate": "/ContractShortening/IsOffer/{contractDate}"

encoded json

First way - his try (another person)


and it dont work - 404 from another company / 400 if I try

What I have tried:

Second way - I try"contractNumber"%3a+"22%2f0546%2f21"%2c%0d%0a++"month"%3a+10%2c%0d%0a++"year"%3a+2022%0d%0a%7d

and it work - i add

//-- so

is the way it passes the json to the method wrong?

can anything be done better here?

should I give them this code?


should i do something different?
Updated 20-Dec-22 8:44am
Richard Deeming 19-Dec-22 4:56am    
We have no idea what the receiving code looks like. But passing a JSON document in the URL seems like a very bad idea. Aside from all the encoding issues, you could quickly bust the "maximum URL length" settings on your server, on in the browser.

Why not use a POST or PUT request instead?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900