I heed to amend a request header to some of my HTTP requests which application sends, but they managed by QML MediaPlayer. I tried to use setNetworkAccessManagerFactory(), like it shown here, and it works with Image, but it still does not work with MediaPlayer. Apperantely, MediaPlayer does not using QNetworkAccessManager.
How can I do that?
Related
I am trying to get the fingerprint as can be seen from this snapshot.
I tried searching for the fingerprint but it's not in the response or cookies. I am wondering how this fingerprintjs works so that I can imitate and return the fingerprint item.
The website is https://alfagift.id/
When you take a look into network, especially categories, there's a preflight and an xhr where it is initiated by https://alfagift.id/_nuxt/ca268e7.js
I've tried doing a requests
resp=requests.get(" https://alfagift.id/")
resp.cookies
nothing seems to be returning the fingerprint that's needed.
Can anyone show me how you can get the fingerprint?
This file's rendering and executing the fingerprinting script on the client side: https://alfagift.id/_nuxt/f9d159c.js
Proof:
__fpjs_d_m||Math.random()>=.001))try{var t=new XMLHttpRequest;t.open("get","https://m1.openfpcdn.io/fingerprintjs/v3.3.3/npm-monitoring",!0),t.send()}catch(t){console.error(t)}}(),[4,vt(r)];case 1:return t.sent(),[2,gt(L(ft,{debug:n},
Used library: https://github.com/fingerprintjs/fingerprintjs
So I have a webpage, ("http://data.terapeak.com/verify/") and I don't see any & tags in the URL so I am unaware how to post data to this. I need to do this via HTTPRequest rather than browser control. I am creating a double threaded batch searching program. I have already successfully made this using a single browser control but that wont allow for multi-threading, atleast with my current knowledge due to the fact that even when creating a new frmBrw that already exists it needs for me to set the threat apartment to single. If i set it to single, I am unable to have it send the data the the excel sheet I need both threads to access. I hope this is clear... The basic question is how can I log into this form via HTTP request.
This isn't going to be easy to answer without further details however I suspect you'll need to provide the variables via a HTTP POST request.
Can you successfully login to this page in your browser? If so, run a proxy tool such as fiddler and check the HTTP headers it makes to the server. You should see the form variables being passed over. You then need to mimic this in code.
How to: Send Data Using the WebRequest Class
Hope this gets you started
A browser sends a GET request for a static web page to a server. The server sends back HTTP OK response with the HTML page in the HTTP body. Looking at the Content-Length field or looking for the terminating chunk or some other delimiter for some other encoding the browser can know if it has received the web page and subsequently all its embedded objects (images etc.). Is it correct to say that in this case the browser always knows when a web page has completely loaded and that it will see no further network traffic?
Now if the page is dynamic (lets say facebook or gmail), where you might receive notifications or parts of the page gets updated using AJAX or javascript running in the background, here also the browser should know when the page has loaded. What if the server is pushing some updates to the client. Is it possible in this scenario for the browser to know when it has received the full update?
So, is there any scenario in which a browser doesn't know when it has fully received the data (static or dynamic) it has requested from a web server or push-based updates the server is forwarding to it?
I can only imagine (for the static case) the one scenario when Content-Length is not set. It's not mandatory to send it for the server.
Potentially, of course, in a page containing scripts, one could also have other scenarios where the script loads bits and pieces one by one with delays (including the AJAX scenario you mentioned). This way the browser would not know in advance either. In such a case it would know "for the moment" that the page has loaded completely, but the next action from the script would invalidate that assertion again.
You do not need AJAX to get in a situation where not all elements in the page are loaded even after the page itself has been loaded. A little javascript is all that you need (been a while since I last worked with JS, there might be some syntax errors)
<img id="dyn_image" src="/not_clicked.gif">
<input type="button" onclick="javascrit:document.get("dyn_image").src="/clicked.gif">
There are cases when the server uses some kind of push technology, for example Comets. In this case a request (generally Ajax request) is sent, without receiving any response (obvoiusly no HTTP headers as well), but leaving the TCP connection open. This may take long time, but still may be considered as a sub-case of Ajax calls.
The other case is HTML5's WebSocket technology. In a WebSocket the server side can push data to the client side without explicit request from the client side.
These two can be combined, so the answer to your question is: yes, there can be cases when you cannot predict that the network traffic is over or not. The common (in all cases) is that the client side must leave a channel open to the server.
With help of xmlHttpRequest I make a server query.
After that the server is redirecting to another page (e.g. "http://site.com/index.html;var=123")
The question is - how can I get full url(side.com/index.html;var...)?
The code is executed with Adobe Air.
thanks
I presume you mean, you are making an xmlHttpRequest inside the HTML control of Adobe Air. AIR provides no functionality on trapping calls originating from the web page that are not a part of the user action. Thus, your AJAX query will move the same way as in a browser. The only luck you may have is with JavaScript to trap the response of the call and use it.
On a side note, you may try loading the same URL with URLLoader/URLStream using a HEAD request in Adobe AIR, with URLRequest.followRedirects set to false. Then listen to HTTPStatusEvent and read the Location response header. HTH.
I'm debugging my webserver, and I'd like to manually send HEAD requests to some web pages. Is there a way to do this in Firefox? Some extension perhaps.
I want to use firefox so that it can be part of a normal session (ie cookies set, logged in, etc). So things like curl aren't perfect.
Another possiblity is opening up firebug (or making this into a greasemonkey script) and using javascript to send your HEAD request.
// Added comments
var xmlhttp = new XmlHttpRequest();
xmlhttp.open("HEAD", "/test/this/page.php",true); // Make async HEAD request (must be a relative path to avoid cross-domain restrictions)
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) { // make sure the request is complete
alert(xmlhttp.getAllResponseHeaders()) // display the headers
}
}
xmlhttp.send(null); // send request
XmlHttpRequests inherit the cookies and current session (authentication from .htaccess etc).
Way to use this:
Use the javascript: url method
Use the Firebug console (http://getfirebug.com/) to execute javascript on the page
Create a greasemonkey script that executes HEAD requests and displays the result
Live HTTP Headers can send arbitrary HTTP requests using its replay function. Though it's a bit fiddly. And as it's a HEAD request, there'll be no output to see locally (it's normally displayed in the browser window).
First you need to open up the Live HTTP Headers (LHH) window, do your request from the browser using GET, then select that request in the LHH window and choose Replay.... Then, in the window that pops up, change GET to HEAD and fiddle with the headers if you like.
Pressing Replay will make the request.
This is a pretty old thread, but there is a firefox plugin called "Poster" that does what you want.
There is another plugin I've used called "Rest Client" that is also good.
I don't know of any plugin but this page might be of some use to you
http://www.askapache.com/online-tools/http-headers-tool
I believe that you can send head requests with Fiddler
http://www.fiddler2.com/Fiddler2/version.asp
This seems to be a solution that works in firefox as an addon, called Modify Headers
https://addons.mozilla.org/en-US/firefox/addon/967
Check out http-tool for firefox ..
https://addons.mozilla.org/en-US/firefox/addon/http-tool/
Aimed at web developers who need to debug HTTP requests and responses.
Can be extremely useful while developing REST based api.
Features:
* GET
* HEAD
* POST
* PUT
* DELETE
Add header(s) to request.
Add body content to request.
View header(s) in response.
View body content in response.
View status code of response.
View status text of response.