[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ftpapi] (no subject)


Your English seems very good to me.

Its important to understand that anything in an additional headers xproc (which is what your "add_headers" subprocedure provides) is added IN ADDITION to those provided by HTTPAPI.  Therefore its important not to set a header that HTTPAPI already sets, since you will end up with a duplicate header.  In this case, you are setting "Content-Type", which is something you should never do.  From your description, this hasn't caused you any problems, yet.  But... it could.

Therefore, please set the content type the normal way instead of via add_headers.  I'd be more explicit, here, but I don't know which subprocedure you're calling to make the request, so I cannot.

Setting the 'Authorization: token' this way is good.

Once your request is finished, call http_xproc(HTTP_POINT_ADDL_HEADER : *NULL); to disable the additional headers so they do not affect any further requests.

Scott Klement
On 1/6/2021 1:37 PM, Luciano Concilio wrote:
One of the problems is my English is very basic. I'm sorry about that.

One of the webservices that I consult has data that is passed through the header and the others do not.
The new one has

P add_headers     B                                                  
D add_headers     PI                                                
D encabezados                32767A   varying                        
D CRLF            C                   const(X'0d25')                
    encabezados = 'Content-Type: text/plain ' + CRLF +              
                  'Authorization: Token ' + %trim(Ptoken) + CRLF ;  
P                 E                                                  

And the others do not use http_xproc(HTTP_POINT_ADDL_HEADER :%paddr(add_headers));   
This can affect the other posts that are made in later programs?

I hope it is better understood. I put this together with Google Translate from Spanish

If not it does not matter. Submit the programs so that they do not take previous values. 


El mar, 5 ene 2021 a las 21:00, Scott Klement (<sk@xxxxxxxxxxxxxxxx>) escribió:
Hello Luciano,

Its not clear what problem you're having?   I would suggest creating a
trace file, and look to see what is going wrong.

If you want to be sure that you are clearing all variables, reclaiming
the activation group would do that.

But, if you know which variable is causing the problem, there is
probably a more efficient way to clear that one setting -- we just need
to find out what it is.

Scott Klement

On 1/5/2021 6:53 AM, Luciano Concilio wrote:
> HI,
> I have a process that downloads informacion from many webservice and
> api application.
> I recently added a new one and some of the previous ones stopped
> working, but if I leave it as it was before they work, which means
> that this new process changes some variable that affects the previous
> ones.
> I can't find what the error is, so I ask. Is there a function that
> resets all variables?
> Or am I going to have to submit this function separately?
Ftpapi mailing list


El mejor amigo del hombre es el perro y el mejor amigo del perro es otro perro.

Ftpapi mailing list