get

Passing a list of int to a HttpGet request

落花浮王杯 提交于 2019-12-03 02:31:12
I have a function similar in structure to this: [HttpGet] public HttpResponseMessage GetValuesForList(List<int> listOfIds) { /* create model */ foreach(var id in listOfIds) model.Add(GetValueForId(id) /* create response for model */ return response; } However, when I do a Get request for the method: {{domain}}/Controller/GetValuesForList?listOfIds=1&listOfIds=2 I get an error when debugging stating that listOfIds is null. In our controller we have a number of public HttpGet methods that work fine, and when changing the parameter to a single int it works. I've tried changing the parameter type

Move Files older then 31 days to another drive

陌路散爱 提交于 2019-12-03 02:30:29
Function Move { #Moves all files older than 31 days old from the Source folder to the Target Get-Childitem -Path "E:\source" | Where-Object { $_.LastWriteTime -lt (get-date).AddDays(-31)} | ForEach { Move-Item $_.FullName -destination "F:\target" -force -ErrorAction:SilentlyContinue } } in the source directory are files that are older than 2-3 years, but when i run the script nothing moves to the target directory ?! whats wrong ? I don't know if this makes much of a difference, but rather than $. it needs to be $_. I tried this script and it works fine for me: get-childitem -Path "E:\source" |

Retrofit error URL query string must not have replace block

只愿长相守 提交于 2019-12-03 02:28:35
I have this function @GET("/users?filters[0][field]={param}&filters[0][operator]=equals&filters[0][value]={value}") UserDto retrieveUsersByFilters(@Path("param") String nameFilter, @Path("value") String value); I try to call it like this : UserDto currentUser = interfaceUser.retrieveUsersByFilters(User.LOGIN, login); But i have error : retrofit.RetrofitError: InterfaceUser.retrieveUsersByFilters: URL query string "filters[0][field]={param}&filters[0][operator]=equals&filters[0][value]={value}" must not have replace block. I already test url on firefox and it work fine. Thank's for your

determine if server supports resume get request

做~自己de王妃 提交于 2019-12-03 02:20:27
问题 How does one determine if a server supports resuming a file transfer or get request? My thoughts were to set the header to start the get request at byte "2" instead of 0, and immediately closing the http request if that gave the proper result but I was wondering if there was something about the server response for a different kind of probe that would reveal this information to me 回答1: To probe the download resume feature of a server, you may send a HEAD request to the server supplying a Range

Get cookies in php? [duplicate]

≯℡__Kan透↙ 提交于 2019-12-03 01:21:57
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: It is possible to insert data in two different table in mysql by one insert query php? I have some users information saved in cookie, the users information are like this, Fname:Muhammad,Lname:Riaz,title:Developer,org:MagicLamp,email:riaz@yaho.com I want to insert these information in to mysql database , The problem is this how can I get these information from cookie and insert into database 回答1: It looks like

$_GET . Undefined Variable. Cant find solution [closed]

自闭症网瘾萝莉.ら 提交于 2019-12-03 01:21:31
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I'm having an issue and am out of ideas. I'm trying to get a parameter from the URL, but PHP insists in saying that the variable is not defined. The URL is http://localhost/trendwatcher/index.php?date=2014-10-18 And the script is something like <?php include "header.php"; ?> <section id="stats"> Showing trends

Restrict POST Request The Server

南笙酒味 提交于 2019-12-03 00:11:05
I want to restrict all POST request that comes from other server via .htacces if they try to post any from other server thing they will get redirected to home page or 404 etc. I tried this <Limit POST> order deny,allow deny from all allow from 127.0.0.1 </Limit> Note:- GET request are allowed from all servers. Only to block POST requests. Jon Lin That block will only prevent POST requests from hosts other than 127.0.0.1, and you will get a 403 Forbidden response. You could try using mod_rewrite and replace the <LIMIT> with: RewriteCond %{REQUEST_METHOD} POST # allow the server to POST to

TemplateSyntaxError in Django at /admin/login (default requires 2 arguments, 1 provided)

天涯浪子 提交于 2019-12-02 23:11:45
问题 I looked thoroughly into my files and I could not find one error. Staring and reading my files for 45 minutes was a pain. I now need someone's help, I can't do this this is the path of the app: website music project1 #this is the main folder that includes settings.py db.sqlite3 manage.py urls.py from project1 (main) folder: from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^music/', include('music.urls')), ] urls

Github API v3 doesn't show all user repositories

谁都会走 提交于 2019-12-02 22:34:50
If i type this command: $ curl https://api.github.com/users/KiCad/repos | grep full_name I expect that it will return all KiCad repositories, but it returns: "full_name": "KiCad/Air_Coils_SML_NEOSID.pretty", "full_name": "KiCad/Buzzers_Beepers.pretty", "full_name": "KiCad/Capacitors_Elko_ThroughHole.pretty", "full_name": "KiCad/Capacitors_SMD.pretty", "full_name": "KiCad/Capacitors_Tantalum_SMD.pretty", "full_name": "KiCad/Capacitors_ThroughHole.pretty", "full_name": "KiCad/Choke_Axial_ThroughHole.pretty", "full_name": "KiCad/Choke_Common-Mode_Wurth.pretty", "full_name": "KiCad/Choke_Radial

Send values to $_GET using jQuery

蹲街弑〆低调 提交于 2019-12-02 22:24:06
问题 I'm using a PHP script that is waiting for two values through $_GET. I'm trying to pass those 2 values using jQuery and that's where I'm not too good at. Here's the code I've got. Can somebody point me in the right direction ? Thanks ! function xrate(id,rating){ $.ajax({ url: "ajax_xrate.php?id="+id+"&rate="+rating, global: false, type: "GET", dataType: "text", async:false, success: function(){ alert('Bravo!'); } }); } (actual code copied from the comments) function xrate(id,rating){ var