This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245015

Summary: "Test RESTful Web Services" should allow to set "Authorization" header
Product: webservices Reporter: terje7601
Component: RESTAssignee: Milan Kuchtiak <mkuchtiak>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description terje7601 2014-06-12 13:32:55 UTC
As the title says, I would like to be able to set an "Authorization" header to test secured web services.

I've tried adding this functionality myself in the generated code, but didn't really succeed (+ that I don't want to have to modify the generated code every time I want to test secured web services).

Just for your interest, some difficulties I encountered in my attempts, are:

1) getting an XMLHttpRequest with an Authorization header to work with CORS (see e.g. http://stackoverflow.com/questions/21850454/how-to-make-xmlhttprequest-cross-domain-withcredentials-http-authorization-cor ).
2) the generated JavaScript makes all requests with "async" set to false, while Firefox requires async to be true when XMLHttpRequest.withCredentials is set to true (see http://stackoverflow.com/questions/12472395/withcredentials-property-is-not-supported-in-firefox )
Comment 1 Milan Kuchtiak 2014-07-04 13:10:58 UTC
The requirement is legitimate.
Comment 2 Milan Kuchtiak 2014-07-25 16:16:02 UTC
Implemented.

See:
http://hg.netbeans.org/web-main/rev/0daa1335d322
Comment 3 Quality Engineering 2014-07-26 01:24:36 UTC
Integrated into 'main-silver', will be available in build *201407260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/0daa1335d322
User: Milan Kuchtiak <mkuchtiak@netbeans.org>
Log: #245015: add ability to type custom HTTP Request Headers in REST Resources test client