detergentex icon indicating copy to clipboard operation
detergentex copied to clipboard

Add header to SOAP Request

Open phongmh307 opened this issue 9 years ago • 7 comments

Does anyone have an example about how to add header to request? I'm searching and trying for whole night without any positive result.

Thank you so much

phongmh307 avatar Dec 04 '15 23:12 phongmh307

@r-icarus

Obviously this isn't necessarily an issue with the library, but I can't seem to figure out how to add headers either. It's the one thing stopping me from using detergentex, TBH.

@phongmh307 Since this issue is quite old. Did you ever end up figuring it out?

Thanks in advance!

davidlaprade avatar Oct 25 '18 15:10 davidlaprade

@davidlaprade I think there was a way to do it in the erlang version. I can take a look at that this weekend.

r-icarus avatar Oct 26 '18 17:10 r-icarus

Thank you @r-icarus! That'd be a huge help. Really appreciate it!

davidlaprade avatar Oct 28 '18 01:10 davidlaprade

@davidlaprade It looks like there is a version that takes a header here:

  • https://github.com/devinus/detergent/blob/master/src/detergent.erl#L113

I'm using the simplier version here:

https://github.com/r-icarus/detergentex/blob/master/lib/detergentex/client.ex#L15

So may we can add another call function with a different arity and call the correct detergent function.

Feel free to implement it an make a PR. If you do I'll make sure it gets merged and published to hex.

r-icarus avatar Oct 29 '18 07:10 r-icarus

Awesome @r-icarus. I'll try to get a PR up in the next week or so. Thanks again for the help!

davidlaprade avatar Oct 29 '18 13:10 davidlaprade

I need to set SOAP Headers too, did you ever get around to this?

beno avatar Jan 10 '19 21:01 beno

I have not yet, sorry @beno -- been busy with other projects. I'll ping you if/when I get to it.

davidlaprade avatar Jan 12 '19 19:01 davidlaprade