Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String escaped JSON structure - POST/PUT fails silently #67

Open
sondreb opened this issue Sep 21, 2020 · 3 comments
Open

String escaped JSON structure - POST/PUT fails silently #67

sondreb opened this issue Sep 21, 2020 · 3 comments

Comments

@sondreb
Copy link

sondreb commented Sep 21, 2020

Thanks for a great library! I have used it previously, and now I'm working on a different project and I have been unable to get it working with POST/PUT when the data structure includes string escaped JSON structure.

I don't have time to reproduce right now, but I'll make one another time as I just found a solution and need to do some other work. I replaced the proxy library with a very basic IHttpClientFactory usage and now it works.

It's basically a body payload that looks like this:

{
    "id": "d8223bbe-29d5-48aa-9510-9be9af965062",
    "content": "{\"category\":\"messages\",\"title\":\"This does not work\",\"content\":\"No fun...\"}"
}

The endpoint this is sent to is another .NET Core API exposed through API Management. Might be some issues there that causes this, but it works from Postman and it works from IHttpClientFactory, so I don't think the issue is there.

@sondreb sondreb changed the title String escapes JSON structure - POST/PUT fails silently String escaped JSON structure - POST/PUT fails silently Sep 21, 2020
@twitchax
Copy link
Owner

Interesting. If you have a chance to PR a failing test, that would be super helpful. :)

@sondreb
Copy link
Author

sondreb commented Sep 23, 2020

I will, but I have refactored the implementation to not perform string-escaped JSON and it caused similar issues. So this is likely more an problem with Azure Application Gateway / Azure API Management. I will investigate further soon.

@twitchax
Copy link
Owner

Hmmm, that is even weirder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants