# Returning JSONP or accessing Dreamfactory without a server

**URL:** <https://community.dreamfactory.com/t/returning-jsonp-or-accessing-dreamfactory-without-a-server/3286>\
**Category:** REST API\
**Created:** [October 3, 2016, 5:36pm UTC](https://community.dreamfactory.com/t/returning-jsonp-or-accessing-dreamfactory-without-a-server/3286 "2016-10-03T17:36:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jraiche](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jraiche](https://community.dreamfactory.com/u/jraiche)\
**Post date:** [October 3, 2016, 5:36pm UTC](https://community.dreamfactory.com/t/returning-jsonp-or-accessing-dreamfactory-without-a-server/3286/1 "2016-10-03T17:36:59Z")

</div>

I’d like to call dreamfactory endpoints from clientside JS (no webserver) for our internal reporting apps. In other words, allow non-technical users to run the reports on the laptop with no server installed.

Normally you can call dreamfactory using ajax calls, but if you’re running a script from the file:// protocol, modern browsers block all requests, whether or not cors is enabled. The obvious workaround is to use dynamically created `<script>`s and wrap the response in a variable or function callback ([jsonp](http://stackoverflow.com/questions/3839966/can-anyone-explain-what-jsonp-is-in-layman-terms)).

Is there a way to easily configure dreamfactory endpoints to return JSONP? Or do I need to create an endpoint that wraps the response of other endpoints and implement this myself?

Or is there another way to access dreamfactory endpoints without hosting the client files on a server?

---

<div class="post-metadata">

**Author:** ![jraiche](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jraiche](https://community.dreamfactory.com/u/jraiche)\
**Post date:** [October 10, 2016, 3:16pm UTC](https://community.dreamfactory.com/t/returning-jsonp-or-accessing-dreamfactory-without-a-server/3286/2 "2016-10-10T15:16:35Z")

</div>

Nevermind, I take it back, you can do file:// protocol requests; something else was broken.

```
$.get('http://[censored[/api/v2/samples/_table/t_[censored]?include_schema=true&api_key=[censored]&filter=([censored])', function(d) {
  console.log(d);
}); 

```

works fine.
