question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to convert query with withHttpConfig to customGET

See original GitHub issue

Hi How to convert this query

Restangular.one('user/export/excel').withHttpConfig({responseType: 'blob'}).get().then(function(response) {
             var url = (window.URL || window.webkitURL).createObjectURL(response);
             window.open(url,"_self");
        })

to

var _userService = Restangular.all('user');

_userService.customGET('export/excel').withHttpConfig({responseType: 'blob'}).get().then(function(response) {
             var url = (window.URL || window.webkitURL).createObjectURL(response);
             window.open(url,"_self");
        })

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
ConcurrentHashMapcommented, Apr 26, 2016
var _userService = Restangular.all('user');

_userService.withHttpConfig({responseType: 'blob'}).customGET('export/excel').then(function(response) {
    var url = (window.URL || window.webkitURL).createObjectURL(response);
    window.open(url,"_self");
})

should work.

0reactions
bostromcommented, Jan 18, 2017

Closing due to the nature and age of issue. Please consider the updated issue guidelines and reopen if needed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

https://softwarepublico.gov.br/gitlab/noosfero-the...
It is converted to a query string, if not already a string. ... params: any, headers: any): IPromise<any>; + withHttpConfig(httpConfig: angular.
Read more >
Untitled - Plunker
... .initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px ... Error("'auto' array mode is for query parameters only");return new d(this ...
Read more >
斜角一, Ngx-restangular, Restangular customPUT, Mgonto 长方形 ...
withHttpConfig ({transformRequest: angular.identity}) .customPOST(formData, undefined, undefined, { 'Content-Type': undefined}); Ngx-Restangular 是为任何 ...
Read more >
Http failure during parsing for http://{url} - ...anycodings
... query string params and anycodings_ngx-restangular headers with customGET, ... withHttpConfig to pass anycodings_ngx-restangular custom config to the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found