Skip to content
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.

ebayApiPostXmlRequest request is incorrect #15

Open
afreeland opened this issue Oct 3, 2014 · 0 comments
Open

ebayApiPostXmlRequest request is incorrect #15

afreeland opened this issue Oct 3, 2014 · 0 comments

Comments

@afreeland
Copy link

I started using the current master branch that utilizes the request module...however I started having code failing giving me the error

{
    "EBayTime": "2014-10-03 18:43:44",
    "Errors": {
        "Error": {
            "Code": "2",
            "Column": "0",
            "ErrorClass": "RequestError",
            "Line": "0",
            "Severity": "SeriousError",
            "SeverityCode": "1",
            "ShortMessage": "Unsupported verb."
        }
    }
}

After fooling with this for a few hours and ensuring that everything was going to ebay as they expected...I reviewed the code around utilization of request.

In the ebayApiPostXmlRequest function there is an object called options.reqOptions which contains data for the xml body and headers for the request headers. However, when it is handed off to the request module the options.reqOptions is passed into the request headers parameter...which is incorrect

current (i assume broken?)

var request = requestModule.post({'url': url, 'headers': options.reqOptions}, function(error, response, result) {

working (assume fix?)

var request = requestModule.post({'url': url, body: options.reqOptions.data, 'headers': options.reqOptions.headers}, function(error, response, result) {

Hope this helps anyone that has seen this issue..

benbuckman added a commit that referenced this issue Oct 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant