# Postman request to web API works but the C# code provided by postman doesnt function?

**URL:** <https://community.postman.com/t/postman-request-to-web-api-works-but-the-c-code-provided-by-postman-doesnt-function/10865>\
**Category:** Help Hub\
**Tags:** api\
**Created:** [February 18, 2020, 4:40pm UTC](https://community.postman.com/t/postman-request-to-web-api-works-but-the-c-code-provided-by-postman-doesnt-function/10865 "2020-02-18T16:40:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LouisVital](https://avatars.discourse-cdn.com/v4/letter/l/c37758/32.png) [@LouisVital](https://community.postman.com/u/LouisVital)\
**Post date:** [February 18, 2020, 4:40pm UTC](https://community.postman.com/t/postman-request-to-web-api-works-but-the-c-code-provided-by-postman-doesnt-function/10865/1 "2020-02-18T16:40:18Z")

</div>

I have tested my request to web API through postman and it works fine, however when I use the code provided to add it into C# it doesn’t work. Any idea what I can try to change?

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/e/eb000301837c1ae1d1829b218312c9c710ece257.png)

The response on postman is 1 so from the if statement it should display 1 but it says fail.
