Ask a Question

[RESOLVED] Cannot invoke method setRequestHeader on null object

Mason
Frequent Contributor

[RESOLVED] Cannot invoke method setRequestHeader on null object

I have a RequestFilter.filterRequest event with the following code:

def subscriber_NTN = context.getProperty("subscriber.NTN");
log.info ("subscriber_NTN = " + subscriber_NTN);
def NTN_id_header = context.getProperty("PostMethod")
NTN_id_header.setRequestHeader("NTN_id", subscriber_NTN);


What's interesting is, the log shows the subscriber_NTN variable being populated.  However, when passed in as one of the parameters to the setRequestHeader method, it is behaving like it's "empty".

Any thoughts?
1 REPLY 1
Mason
Frequent Contributor

Re: [RESOLVED] Cannot invoke method setRequestHeader on null object

case-sensitivity issue:  I had "PostMethod" instead of "postMethod".
cancel
Showing results for 
Search instead for 
Did you mean: