# Web-error response -\> body: "Cannot POST

**URL:** <https://forum.ionicframework.com/t/web-error-response-body-cannot-post/89189>\
**Category:** ionic-v3\
**Created:** [May 6, 2017, 5:45am UTC](https://forum.ionicframework.com/t/web-error-response-body-cannot-post/89189 "2017-05-06T05:45:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikhil\_dhar123](https://avatars.discourse-cdn.com/v4/letter/n/b19c9b/32.png) [@Nikhil\_dhar123](https://forum.ionicframework.com/u/Nikhil_dhar123)\
**Post date:** [May 6, 2017, 5:45am UTC](https://forum.ionicframework.com/t/web-error-response-body-cannot-post/89189/1 "2017-05-06T05:45:59Z")

</div>

My code

```auto
let body : string = "key=insert&name=" + this.name + "&email=" + this.email + "&post=" + this.post,
          type : string = "application/x-www-form-urlencoded; charset=UTF-8",
          headers : any = new Headers({ 'Content-Type': type}),
          options : any = new RequestOptions({ headers: headers }),
          url : any = "/var/www/html/ionic/myApp/src/app/add-data.php";
        this.http.post(url,body,options)
        .subscribe((data) => {
          console.log(JSON.stringify(data));
               })

```

is the above code correct I am getting error like  
android response-\> console.error: ERROR  
[object Object]

web-error response -\> body: "Cannot POST /var/www/html/ionic/myApp/src/app/add-data.php 404 not found if I copy thislink on web it will directly download the file

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [May 6, 2017, 1:24pm UTC](https://forum.ionicframework.com/t/web-error-response-body-cannot-post/89189/2 "2017-05-06T13:24:13Z")

</div>

The URL you are POSTing to does not exist. This looks like a path on your local or dev machine. You need something that start with `http://` or `https://`, and when you copy it into your browser it should call the site.
