back soft

مطالب مرتبط با «http» در back soft | نویسنده: استخدام کار

how to install root CA for windows devices to decrypt incoming https traffic

Vote count: 0 How to install root CA for windows devices to Decrypt incoming HTTPS traffic using c# ? asked 38 secs agovishnuvaradhan Let's block ads! بخوانید...

ادامه مطلب

How to modify below code to use HTTP POST instead of GET in android

Vote count: 136 I am trying to do POST with HttpURLCoection(I need to use it this way, can't use HttpPost) and I'd like to add parameters to that coection such as post.setEntity(new UrlEncodedFormEntity(nvp)); where nvp = new ArrayList(); having some data stored in. I can't find a way how to add this ArrayList to my HttpURLCoection which is here: HttpsURLCoection https = (HttpsURLCoection) url.openCoection(); https.setHostnameVerifier(DO_NOT_VERIFY); http = https; http.setRequestMethod("POST"); http.setDoInput(true); http.setDoOutput(true); The reason for that awkward https and http combination is the need for not verifying the certificate. That is not a problem, though, it posts the server ...

ادامه مطلب

new XMLHttpRequest().responseType empty

Vote count: 0 Why is responseType empty? JavaScript var xhr = new XMLHttpRequest(); xhr.open(method,url,true); xhr.onreadystatechange = function() { if (xhr.readyState=='4') { if (xhr.status==200) { console.log(xhr.responseType);//[empty] } } } PHP header('Content-Type: application/json'); //[Validated JSON Data] No frameworks. asked 1 min agoJohn Let's block ads! بخوانید...

ادامه مطلب

Manage http.get response from java spring method

Vote count: 0 I have to manage http get response from java spring get request. File downloaded from server is a zip (and inside it a .pdf and .png). This is java code: @RequestMapping(value="/data/{meetingId}", method = RequestMethod.GET) public byte[] getMeetingRest(@PathVariable(value="meetingId") String meetingId) { byte[] file = new byte[1024]; Buffer buf =null; try { String url = getContentServer()+"/data?useame="+getUseame()+"&password="+getPassword()+"&id="+meetingId; RestTemplate templ = new RestTemplate(); file = templ.getForObject(url, byte[].class); } catch (Exception e) { String msg = "Error retrieving meeting list"; logger.error(msg, e); } logger.info("file zip --> "+file.length...

ادامه مطلب

Best Scope in Dagger2 for Okhttp3 with dynamic Interceptors

Vote count: 0 How would the scope work with Auth Tokens? I caot create my Retrofit instance until I can add an interceptor that signs it with my auth token. Therefore, I would like to create Retrofit when the auth tokens are available (after sign-in). How do I get scope working correctly in this situation? Thanks a lot! asked 2 mins agoChema Let's block ads! بخوانید...

ادامه مطلب

What is the best and lighweighted library to make HTTP calls in Android?

Vote count: 0 What is the best and lighweighted library to make HTTP calls in Android? asked 2 mins agohumy Let's block ads! بخوانید...

ادامه مطلب

Monitor and prevent outgoing HTTP request made from javascripts

Vote count: 0 I have a web page with around 10 JS files, and within the web page there should not be any form of outgoing request made by JS, that is, the scripts should be able to run locally without any HTTP request to other sites. The thing is, I didn't write the JS code, so how do I figure out if JS is making contact with other servers? Browser's console doesn't seem to be helpful with that. Or is there a function that could override all JS outgoing requests? asked 1 min agoGalaxy Let's block ads! بخوانید...

ادامه مطلب

HttpBuilder uploading file without extension

Vote count: 0 So I got this gradle script that let's me upload apks to Nexus. The issue is that those files end up without file extension on the server which is a problem if you want to download an app from there. It seems that I'm passing the proper mime type but even with that I'm still getting a file without extension. Here is the code: def uploadToRepository(File file, String folder, String url, String userName, String password){ HTTPBuilder http = new HTTPBuilder(url) String basicAuthString = "Basic " + "${userName}:${password}".bytes.encodeBase64().toString() http.client.addRequestInterceptor(new HttpRequestInterceptor() { void process(HttpRequest httpRequest, HttpContext httpContext) ...

ادامه مطلب

How to get XML data from https url in Android

Vote count: 0 I want to get XML data from the web server https://ruralfire.qld.gov.au/bushfirealert/bushfireAlert.xml However, I can't do it because my codes always have an error "javax.net.ssl.SSLHandshakeException: Coection closed by peer". And my InputStream is always null, so I can't do anything with it (such as parsing). I ensure that the problem is in my coection but I don't know how to solve it. This is my code in coecting to the web server: private InputStream downloadUrl(String urlString) throws IOException { URL url; url = new URL(urlString); InputStream is = null; try { HttpsURLCoection con = (HttpsURLCoection)url.openCoection(); is = con.getInputStream(); } catch (MalformedURLExc...

ادامه مطلب

Error 400 when retreving JSON with $http.get in AngularJS

Vote count: 0 I get an error 400 when i try to retrieve the JSON from this URL below with $http.get. $http.get('https://api.spotify.com/v1/search?q=artist:Owl+City+title:On+The+Wing&type=track&limit=1'). success(function(data) { console.log("Success"); }) .error(function(error, status, headers, config) { console.log(status); console.log("Error occured"); }); I manage to retrieve it with this : $.getJSON('https://api.spotify.com/v1/search?q=artist:Owl+City+title:On+The+Wing&type=track&limit=1').then(function (data) { console.log("Success");}); But the problem is that when i try to change a value in my $scope with this method, it 's only displayed in the view, one action after, because of that...

ادامه مطلب

How to sign someone into Google through HTTP

Vote count: 0 I've been messing with Google OAuth2 and API's but it doesn't seem to achieve what I'm trying to do. I have a google form that I want to access but requires the user to login to their account before being able to access it. I thought the GoogleDriveAPI would work perfectly except for the fact that it only gets files that are in the USER'S drive, and not public files like the one I'm trying to access.(Assuming I'm reading the documentation right) So what would be the best way to sign someone into Google through HTTP? The app I'm designing is a survey app and the idea is to send the user's response through HTTP to a google form. By requiring login, it will prevent multiple submis...

ادامه مطلب

Confusion: $http POST response is returning index HTML contents

Vote count: 0 I am using AngularJS which uses a Ruby on Rails API for authentication. I am using the $http service in AngularJS to register a user using a POST request to the backend, however, I am confused as the response I am getting is always retued in HTML and it is of the index page, not the actual data from the rails API. I am testing this in my local environment where the AngularJS app is ruing on localhost:9000, and the Rails API is on localhost:3000. The AngularJS is using a proxy which directs requests to port 3000. I have tested the response of the Rails API by using curl commands: $ curl -H "Content-Type: application/json" -d '{"user":{"email":"hi@hi.com","password":"12345678"}}'...

ادامه مطلب

Laravel5.2 NotFoundHttpException in RouteCollection.php line 161:

Vote count: 0 Hell, I am building a website with laravel5.2 ,I did a form in layout blade {!! csrf_field() !!} Get the most recent updates from our site and be updated your self... And this is my route Route::post('/subscribe', 'Front@subscrib'); And this function in the controller Front public function subscrib() { echo"we in subsc function"; if (Request::isMethod('post')) { Subscribe::create([ 'email' => Request::get('email') ]); } } But when i write email in the form ,I get this error NotFoundHttpException in RouteCollection.php line 161: in RouteCollection.php line 161 at RouteCollection->match(object(Request)) in Router.php line 823 at Router->findRoute(object(Request)) in Router.php li...

ادامه مطلب

Parse iOS Swift SDK HTTP Requests stopped working spontaneously

Vote count: 0 Without changing anything, simply opening my Xcode workspace and ruing it on my iPhone 6, all coections to Parse seems to hang and end with an Error 3840. Same issue on simulator. Error: Error Domain=NSCocoaErrorDomain Code=3840 "No value." UserInfo={NSDebugDescription=No value.} [NSDebugDescription: No value.] Any Parse queries fails. And this Facebook request retus an error as mentioned below: PFFacebookUtils.logInInBackgroundWithReadPermissions(["public_profile", "email"], block: { (user:PFUser?, error:NSError?) -> Void in print(error?.localizedDescription) // => The data couldn't be read because it isn't in the correct format. print(error) / => Error Domain=NSCocoaErrorDoma...

ادامه مطلب

Google Closure Compiler complaining about XMLHttpRequest.response type

Vote count: 0 Below is a very simplified version of some code that I'm passing to Google Closure Compiler: "use strict"; var xhr = new XMLHttpRequest(); xhr.open("GET", "somefile", true); xhr.responseType = "arraybuffer"; xhr.addEventListener( 'load', function() { var data = new Uint8Array(xhr.response); /* ... do something ... */ } ); This is basically an Ajax query to retrieve raw binary data and it is working as expected. However, the compiler emits the following waing: WARNING - actual parameter 1 of Uint8Array does not match formal parameter found : * required: (Array|ArrayBuffer|ArrayBufferView|null|number) var data = new Uint8Array(xhr.response); ^ I've spent some time trying to fix i...

ادامه مطلب

apache configuration extension doesn't work with https

Vote count: 0 I have an extension to httpd.conf. I am using it for aliases and changing root: The original root was set to /data/www/html and I need it to be /data/www/pages. For several reasons I do not want to touch the original httpd.conf, therefore, I created the custom_config.conf custom_config.conf DocumentRoot /data/www/pages Alias "/blah_blah" "/data/www/blah_blah" Options None AllowOverride None Order allow,deny Allow from all With this, I can access http but not https. I tried and restarted the httpd of course, but still not working. I am not an expert with Apache, but I think it has to do something with ssl.conf that is under conf.d forlder; same place I put my custom_config.conf ...

ادامه مطلب

htaccess redirect from old domain to new domain and https and preserve query string

Vote count: 0 can anybody help me with my problem. I changed the domain of my wordpress site, but on same server. Old site: https://www.old.netNew site: https://www.new.com Now i would like to make the following redirects: http:/www.old.net --> https:/www.new.com https:/www.old.net --> https:/www.new.com http:/www.new.com --> https:/www.new.com http:/www.old.net/example-site --> https:/www.new.com/example-site https:/www.old.net/example-site --> https:/www.new.com/example-site http:/old.net --> https:/www.new.com https:/old.net --> https:/www.new.com http:/old.net/example-site --> https:/www.new.com/example-site https:/old.net/example-site --> https:/www.new.com/example-site etc... (I remove...

ادامه مطلب

Angular json marshalling via $http

Vote count: 0 I am having a very weird problem. Using $http my response is not getting marshalled correctly into map/object. The data is a map of lists. The issue is that the element 100110150000000751 has a value from the raw data in the first log "1 group data[". but after its converted to json it has the value of an empty array. You can see the image of the "after conversion" log. This all works fine in chrome with debugger open but not if debugger is closed. The method is so simple and there is little to no room for race conditions or anything. I created a little desktop html file with all the same libraries and just calling a function without $http and it works without issue. Angular 1....

ادامه مطلب

HTTP Status 500 - Servlet.init() for servlet Jersey Web Application threw exception

Vote count: 0 index.html Jersey RESTful Web Application! Jersey resource Visit the Project Jersey website for more information on Jersey! MyResource.java @Path("/myresource") public class MyResource { /** Method processing HTTP GET requests, producing "text/plain" MIME media * type. * @retu String that will be send back as a response of type "text/plain". */ @GET @Produces("text/plain") public String getIt() { retu "Hi there!"; } } Error is Comming HTTP Status 500 - Servlet.init() for servlet Jersey Web Application threw exception -------------------------------------------------------------------------------- type Exception report message Servlet.init() for servlet Jersey Web Application th...

ادامه مطلب

PHP HTTP client not passing AUTH_USER

Vote count: 0 I'm trying to fetch an image file from an IIS 7 server ruing some ASP code. The goal is to bypass authentication by including the useame and password in the URL. Without authentication, a user is redirected to a login page. This URL-based authentication method (which was provided by the software vendor) works fine from a browser, or from wget on the CLI, but not from within PHP using either file_get_contents() or curl functions. I've tried creating a stream context for file_get_contents() to include a Basic authentication header, in the hopes it would show up there, but no luck. The ASP code it's getting caught on looks like this: var authUser = String(Request.ServerVariables("...

ادامه مطلب