Title: using javascript httpRequest method post in plugin
Last modified: August 20, 2016

---

# using javascript httpRequest method post in plugin

 *  [lubchik](https://wordpress.org/support/users/lubchik/)
 * (@lubchik)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/using-javascript-httprequest-method-post-in-plugin/)
 * Hi all!
    I’m using javascript http request in my plugin, which sends requests
   to some php files that are part of the plugin files. The problem is, when accessing
   those files this way, session is visible but all global wordpress functions and
   variables are not. I think the reason is that request is sent directly to the
   files and not by the wordpress itself. Someone tried to use javascript http requests
   in his plugins? How can I do it the way that the request will act like the wordpress
   itself is sending it and that all the variables and globals will be seen?
 * Example: ABSPATH gets the path of the wordpress root in normal way, but
    gets
   value “ABSPATH” when try to read it when dealing with http request action.
 * Thanks ahead for help!

The topic ‘using javascript httpRequest method post in plugin’ is closed to new 
replies.

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [post](https://wordpress.org/support/topic-tag/post/)

 * 0 replies
 * 1 participant
 * Last reply from: [lubchik](https://wordpress.org/support/users/lubchik/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/using-javascript-httprequest-method-post-in-plugin/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
