FiddlerCore autoresponder - fiddlercore

I'm trying to use fiddlercore for vb.net. I'm trying to redirect a url to a different one as how the auto responder would work. So basically Id do something like if uri.contains(".ashx") redirect traffic too (".png") If that makes any sense

I fixed it by reading up on the documentation some more.

Related

2sxc - Getting URL path from DNN link parameter / Tab ID

I am working on integrating a 2sxc content WebAPI feed into a ReactJS application.
I have managed to get a JSON feed of data into the application, and am in the process of mapping out the data.
I'm wondering what the best practice would be to "resolve" a URL which is coming through as a DNN Page/ Tab ID.
Below I will showcase the various points this is referenced...
First the Setup of the entity / data types...
Then this is an example entry with the data filled out... The page link / URL is set up to point to another internal page on the DNN website:
Finally you can see this data item come through as a JSON feed via the 2sxc API:
What is the best way to convert this piece of data into a URL which can be used in a SPA type application?
There isn't any "server-side" code going on, just reading a JSON feed on the client side...
My initial idea would be to parse this piece of data in JS, to extract the number then use something like this:
http://www.dotnetnuke.com/tabid/85/default.aspx
http://www.dotnetnuke.com/default.aspx?tabid=85
I was hoping someone with more experience would be able to suggest a better / cleaner approach.
Thanks in advance
If you were server-side in Razor you'd be doing something like this:
#using DotNetNuke.Common
View List
XXXX = Dnn.Tab.TabID or define a string with the tab id you want
I seem to have a vague memory that I saw somewhere that Daniel (2sxc) has a way to use Globals.NavigateUrl() or similar on the client side, but I have no idea where or if I did see that.
The Default.aspx?tabid=xx format will certainly work, as it's the oldest DNN convention and is still used in fallbacks. The urls aren't nice, but it's ok.
The reason you're seeing this is because the query doesn't perform the automatic lookup with the AsDynamic(...) does for you. There is an endpoint to look them up, but they are not official, so they could change and therefor I don't want to suggest that you use them.
So if you really want a nicer url, you should either see if DNN has a REST API for this, or you could create a small own 2sxc-api endpoint (in the api folder) just to look that up, then using the NavigateURL. Would be cool if you shared your work.

parse platform - listening for login / logout events

I am using the parse platform (migrated on Heroku).
Could it be possible to achieve something similar to Parse.Cloud.beforeSave or Parse.Cloud.afterSave but instead tied to log-in and log-out events?
Right now I have put an $emit in every piece of code with auth functions.
It would be great to achieve something a bit more generic.
Thanks a lot for your help
Alfo
BeforeLogin was added to the latest version of Parse Server:
https://github.com/parse-community/parse-server/pull/5445

fix the URL when the client moves from one page to another in a Single Page Application

is there any way to fix the URL in a Single Page application when the client moves from one page to an other,but the URL changes in background?
I tried to use #routeProvider but I think it's not my case :/
thanks for Help
I think you are talking about HTML5's History API, especially the .pushState() method.
Check out the browser coverage, nowadays very wide, but that might need fallbacks, according to the old browsers you might want to support.

Which parts of the ImgurV3 API can be used anonymously?

The documentation says:
For public read-only and anonymous resources, such as getting image info, looking up user comments, etc. all you need to do is send an authorization header with your client_id in your requests. This also works if you'd like to upload images anonymously (without the image being tied to an account), or if you'd like to create an anonymous album. This lets us know which application is accessing the API.
But it's not clear what the "etc." part includes. It's not clearly defined in the documentation. I have been using Postman to debug before putting this down in AngularJS -- this is just an AngularJS learning project for me -- and I can't get things like the gallery images for a particular subreddit. I get a status 403 back.
Anyone ever done this before?
As it turns out, if you register for an API key it doesn't take effect right away. The API key you get may not work for a few hours. (I'm guessing this is worst-case.)
It works now, with the exact same code and no changes.

Making a drupal database call using ajax

I want a link that when you click on it, it will call a simple ajax query which updates a database entry. Normally this would be easy, but because authentication needs to happen before the query is executed, I need to be able to execute the Ajax Query AS THE CURRENTLY LOGGED IN USER. I.e. I need access to the $user variable and I don't want to create a new connection.
Does Drupal have native functions that can do this? Is there something I can use to do this?
You're going to want to create a module to handle this. Then, whatever function you call through the callback will have complete awareness of the logged in user.
Keep in mind that if someone makes a link that goes to your AJAX destination on their website, and can trick people into clicking it (or, for that matter, makes that link the src on an img tag), then weird things can happen to people's data without them meaning to.
I suggest the use of a token and checking that the token submitted as part of the link matches something to do with the user. Check drupal_get_token() for a good way to generate one.
Either create a menu item in a module implementing hook_menu() and specify a callback to a function handling this request - or use the Services module and create a new service module.

Resources