http-get

Multiple Get actions with different attribute routing?

时光怂恿深爱的人放手 提交于 2019-12-24 07:39:48
问题 If I design my controller in such a way: public class ItemController : ApiController { [HttpGet] [RoutePrefix("item/dosomething")] public void DoSomething(Item item) { } [HttpGet] [RoutePrefix("item/dosomethingnicer")] public void DoSomethingNicer(Item item) { } [HttpGet] [RoutePrefix("item/dosomethingelse")] public void DoSomethingElse(Item item) { } } Would this work? 回答1: I would expect a structure more akin to this: [RoutePrefix("item")] public class ItemController : ApiController {

PHP: Missing records when writing to file

人盡茶涼 提交于 2019-12-24 05:43:55
问题 My telecom vendor is sending me a report each time a message goes out. I have written a very simple PHP script that receive values via HTTP GET. Using fwrite I write the query parameter to a CSV file.The filename is report.csv with the current date as a prefix. Here is the code : <?php error_reporting(E_ALL ^ E_NOTICE); date_default_timezone_set('America/New_York'); //setting a the CSV File $fileDate = date("m-d-Y") ; $filename = $fileDate."_Report.csv"; $directory = "./csv_archive/"; /

Issue with passing querystring parameters via Http Get to an iframe in IE

你离开我真会死。 提交于 2019-12-24 05:38:07
问题 This is a follow up to my previous question: Problem passing parameters via Iframe in IE. Which was never solved. Here's the core of it: I'm trying to execute an HTTP GET from my website to another website that is brought in via iframe. On Firefox, you can see in the source that the correct url is in the iframe src along with it's correct parameters-- and it works. On IE, you can see in the source that the correct url is in the iframe src along with it's correct parameters-- and it doesn't

Chrome extension: intercept HTTP Response

走远了吗. 提交于 2019-12-24 03:43:29
问题 I saw many pages talking about how to interecet HTTP Response from a site. I'm trying this: Chrome Extension - How to get HTTP Response Body? There are no execuble programs... this is my code: manifest.json: { "manifest_version": 2, "name": "Extension Name", "description": "Some Desc.", "version": "1.1", "browser_action": { "default_icon": "icon.png", "default_popup": "index.html" }, "permissions": [ "activeTab", "storage", "tabs", "https://*.google.com/" ], "content_scripts": [ { "matches":

How to validate and sanitize HTTP Get with Spring Boot?

℡╲_俬逩灬. 提交于 2019-12-24 00:39:28
问题 I keep getting this annoying error from Checkmarx code scanner, Method getTotalValue at line 220 of src\java\com\example\PeopleController.java gets user input for the personName element. This element’s value then flows through the code without being properly sanitized or validated and is eventually displayed to the user. This may enable a Cross-Site-Scripting attack. Here is my code. I think I did ALL the validation necessary. What else??? @Slf4j @Configuration @RestController @Validated

Sending sensitive data as a query string parameter

巧了我就是萌 提交于 2019-12-23 21:38:45
问题 We are reviewing the design of a system. And need to verify what we think may be a security issue. In this system some sensitive information is sent in the query string. Question is: Can the query string parameters be read as the request goes over the internet, even if the request is sent over https? Can the query string parameters be read be read from the browsing history on the client machines? 回答1: When you use HTTPS, the SSL/TLS connection is established before any HTTP traffic is sent,

Anglarjs2 - Http get request : Error: unable to parse url ..original error: Cannot read property 'split' of undefined in [null]

纵饮孤独 提交于 2019-12-23 12:35:58
问题 Getting below error in browser console, when I'm using get Url as web api in Hero.service.ts. But It's working fine when I used with .Json file with in a that project as I'm able to see the values in output page. I'm just learning with angular.io website. Below is the error in the console: angular2-polyfills.js:471 Error: Uncaught (in promise): EXCEPTION: Error: unable to parse url 'http://md5.jsontest.com/?text=example_text'; original error: Cannot read property 'split' of undefined in [null

Web Api 2 - How to return an image (MemoryStream from Azure Storage) from a HTTPGET without saving to disk?

泪湿孤枕 提交于 2019-12-23 08:39:37
问题 I'm using Web Api 2 with C# and Azure, and having issues with how to return the image (base from Memorystream) for displaying on the page... Here is my Controller HTTPGET [Route("api/PhotoSubmit/GetPhoto/{id}")] [HttpGet] public HttpResponseMessage GetPhotoById(int id) { StorageServices storage = new StorageServices(); MemoryStream ms = storage.DownloadBlob(id); // return what ? } Here is the beginning of the servicecall : $http({ method: 'GET', url: 'api/PhotoSubmit/GetPhoto/' + $routeParams

HTTP GET: Get Google Calendar Event List via Google Calendar API v3 - invalid key error

流过昼夜 提交于 2019-12-22 11:28:07
问题 I was using an HTTP GET action on Tasker on Android 4.4 for quite some time now in order to get my future google calendar events. This task no longer works due to Google shutting down the v2 API. For the API v3 an authentification is needed. I tried to get a client key from the developer console. I created a new project and activated the calendar API for it. I then created a new client ID and do have this client ID with its corresponding key. How can I get a list of my (future) events from my

HTTP: Why is wrong sending username and password in get request?

时光怂恿深爱的人放手 提交于 2019-12-22 08:50:36
问题 Genaral practice is when you login, or do something else that requires your username and password, you send it in the body of post request. Also for added security https should be used. In get request these parameters are sent as a part of URL. But in https both body and headers are encrypted, as i understand. So in theory, whether you use https post or get for sending, your data are safe..., in one case attacker will have to decript your header and in other your body. So my question is, if