Skip to content

Convert line endings on posted text #190

Closed
@djedi

Description

@djedi

I'm using OSX and I'm trying to post some text using postman to test an OFX server. Problem is the server expects line endings of \r\n (see http://www.ofxhome.com/ofxforum/viewtopic.php?id=5). I can't seem to figure out how to make this happen.

Activity

a85

a85 commented on Jan 30, 2013

@a85
Contributor

Wouldn't this be a server side issue? I am not sure if I can change it on the fly but let me see if the editor has some options for line-endings.

djedi

djedi commented on Jan 30, 2013

@djedi
Author

I would say its a server side issue, but I have no control over the server I'm trying to post to. It's a very large bank. I'm testing OFX Direct Connect.

a85

a85 commented on Feb 2, 2013

@a85
Contributor

Hmm. This sublime text plugin seems to be able to do this: https://github.com/SublimeText/LineEndings. Can you try it out and see if it works?

djedi

djedi commented on Feb 4, 2013

@djedi
Author

I can convert line ending fine in a number of applications, but when I paste into chrome for OSX and submit its changing all line endings to \n.

It would nice if there were an option to say "force to windows line endings (\r\n)", then on submit it would do a regex replace of the line endings with something like raw_data.replace(/\n/g, "\r\n")

a85

a85 commented on Feb 5, 2013

@a85
Contributor

Would have to check if that works. Postman sends the request using XMLHttpRequest so if the conversion is happening there then I don't think I would be able to fix it. Ideally it should just send whatever is there in the raw body.

djedi

djedi commented on Feb 5, 2013

@djedi
Author

I've forked the repo. Can you tell me where exactly the request is being sent. I can modify it and see if it works. Thanks.

a85

a85 commented on Feb 5, 2013

@a85
Contributor
djedi

djedi commented on Feb 5, 2013

@djedi
Author

I added these two lines and it solved my problems. https://github.com/djedi/POSTMan-Chrome-Extension/compare/line-endings

I'll see if I can figure out the code enough to add it as an option when submitting.

Thanks for your help!

a85

a85 commented on Feb 5, 2013

@a85
Contributor

Awesome. :)

added a commit that references this issue on May 8, 2013

Fix #190, Force line endings setting

b025f8f
PredatorVI

PredatorVI commented on Dec 5, 2013

@PredatorVI

I don't think this is working in the latest POSTMan package. I've removed and reinstalled the latest browser app as well as the Packaged App as of 12/5/2013. When using the Packaged App, I have verified that the "Force WIndows line endings?" setting is set to true, but the Carriage Return 0x0d is still missing. Here is a snippet from the wireshark hex dump. There should be a '0d 0a' after 'index', but there is only a '0a'

 000001D0  2f 38 30 2f 69 6e 64 65  78 2e 68 74 6d 6c 0a 30 /80/inde x.html.0

The HexDump from Fiddler shows the 0d0a:

 ![image](https://f.cloud.github.com/assets/1933277/1688253/d9b00408-5e03-11e3-9f4d-ac151690ca35.png)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @djedi@a85@PredatorVI

        Issue actions

          Convert line endings on posted text · Issue #190 · postmanlabs/postman-app-support