get

REST GET verb with parameters

久未见 提交于 2020-01-22 09:37:51
问题 I'm sitting reading on some REST with my fellow teammates, we are writing a RoR application that is going to expose some of its functionality to the rest of the world. My task on this team is to make a ressource that exposes journal reports. If you call http://root.com/journalreports You should get all the journalreports from the service. Thats working like a charm, but I'm confused on how to properly make a ressource that exposes a range of journalreports. Should I make it http://root.com

REST GET verb with parameters

ε祈祈猫儿з 提交于 2020-01-22 09:36:05
问题 I'm sitting reading on some REST with my fellow teammates, we are writing a RoR application that is going to expose some of its functionality to the rest of the world. My task on this team is to make a ressource that exposes journal reports. If you call http://root.com/journalreports You should get all the journalreports from the service. Thats working like a charm, but I'm confused on how to properly make a ressource that exposes a range of journalreports. Should I make it http://root.com

REST GET verb with parameters

断了今生、忘了曾经 提交于 2020-01-22 09:36:05
问题 I'm sitting reading on some REST with my fellow teammates, we are writing a RoR application that is going to expose some of its functionality to the rest of the world. My task on this team is to make a ressource that exposes journal reports. If you call http://root.com/journalreports You should get all the journalreports from the service. Thats working like a charm, but I'm confused on how to properly make a ressource that exposes a range of journalreports. Should I make it http://root.com

Count items by condition with XML and PHP?

夙愿已清 提交于 2020-01-21 20:11:50
问题 I would like to get the count of only items inside this file with sellingstatus->sellingstate of EndedWithSales ONLY, and perhaps also get the count for EnededWithoutSales . <sellingStatus> <currentPrice currencyId="USD">25.0</currentPrice> <convertedCurrentPrice currencyId="USD">25.0</convertedCurrentPrice> <bidCount>1</bidCount> <sellingState>EndedWithSales</sellingState> </sellingStatus> How would I go about passing this argument in php? Here is a link to the sample of XML: http:/

Count items by condition with XML and PHP?

匆匆过客 提交于 2020-01-21 20:11:31
问题 I would like to get the count of only items inside this file with sellingstatus->sellingstate of EndedWithSales ONLY, and perhaps also get the count for EnededWithoutSales . <sellingStatus> <currentPrice currencyId="USD">25.0</currentPrice> <convertedCurrentPrice currencyId="USD">25.0</convertedCurrentPrice> <bidCount>1</bidCount> <sellingState>EndedWithSales</sellingState> </sellingStatus> How would I go about passing this argument in php? Here is a link to the sample of XML: http:/

Count items by condition with XML and PHP?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-21 20:11:05
问题 I would like to get the count of only items inside this file with sellingstatus->sellingstate of EndedWithSales ONLY, and perhaps also get the count for EnededWithoutSales . <sellingStatus> <currentPrice currencyId="USD">25.0</currentPrice> <convertedCurrentPrice currencyId="USD">25.0</convertedCurrentPrice> <bidCount>1</bidCount> <sellingState>EndedWithSales</sellingState> </sellingStatus> How would I go about passing this argument in php? Here is a link to the sample of XML: http:/

How to grab data from post to a class

旧巷老猫 提交于 2020-01-21 05:21:25
问题 If I have a form such as (not all the code just one field and my input): <div id="login_form"> <form id="registration" method="post" action="results.php"> <label for="first_name"> First Name: </label> <input type="text" id="first_name" name="first_name" maxlength="100" tabindex="1" /> <input type="submit" id="login_submit" name="submit" value="Submit"/ align="right"> </form> </div> Is it possible to grab the data from the form and then output that data to another page. The way I have it now I

jQuery: read text file from file system

本小妞迷上赌 提交于 2020-01-18 16:23:07
问题 I am trying to read a text file using jquery, like this: // LOAD file and split line by line and append divs $.get('myFile.txt', function(data) { var lines = data.split("\n"); $.each(lines, function(n, elem) { $('#myContainer').append('<div>' + elem + '</div>'); }); }); In chrome, I am getting: XMLHttpRequest cannot load file:///C:/myPath/myFile.txt. Origin null is not allowed by Access-Control-Allow-Origin. Firefox shows no error but the code is not executed (I have breakpoints in firebug

jQuery: read text file from file system

荒凉一梦 提交于 2020-01-18 16:15:05
问题 I am trying to read a text file using jquery, like this: // LOAD file and split line by line and append divs $.get('myFile.txt', function(data) { var lines = data.split("\n"); $.each(lines, function(n, elem) { $('#myContainer').append('<div>' + elem + '</div>'); }); }); In chrome, I am getting: XMLHttpRequest cannot load file:///C:/myPath/myFile.txt. Origin null is not allowed by Access-Control-Allow-Origin. Firefox shows no error but the code is not executed (I have breakpoints in firebug

Is there any real reason to differentiate between POST and GET when handling incoming data?

谁都会走 提交于 2020-01-17 03:34:06
问题 Lately I've been using a wrapper PHP class that fetches GET and POST data and lets me access it using a single getter function. After years of developing web applications I've never had a single good reason to care whether an incoming var was coming from POST or GET. Not only that but I got really sick and tired of having to check both arrays for a single variable. Today I noticed that codeigniter has one getter function for POST data and one for GET. Is there any point to this? Has anyone