Copy as cURL(cmd) adds invalid characters to form data
I want to use Postman to test server side validation so I used the browser to submit (valid) data to the server and in the network tab of Chromes developer tools used "Copy as cURL". Then, in Postman, Import->Paste Raw Text -> Import.
If I look at the request body the data appears on x-www-form-urlencoded
tab and every value has a '^
' character appended to it. e.g. JobId: 75051^
When I post it the server validation picks it up as invalid data e.g.
The value "75051^" is not valid for JobId
Edit
If I use "Copy as C=cURL(bash)" instead, the ^
characters are removed but the server doesn't like the encoding used on dates and times. e.g. T
The value '11%2F19%2F2018+12%3A15+AM' is not valid for Work Start Time
What is going on here? Can I get "Copy as cURL" to pick up my data correctly, or is there a better way to pick up the request and get it into Postman?
google-chrome-devtools postman
add a comment |
I want to use Postman to test server side validation so I used the browser to submit (valid) data to the server and in the network tab of Chromes developer tools used "Copy as cURL". Then, in Postman, Import->Paste Raw Text -> Import.
If I look at the request body the data appears on x-www-form-urlencoded
tab and every value has a '^
' character appended to it. e.g. JobId: 75051^
When I post it the server validation picks it up as invalid data e.g.
The value "75051^" is not valid for JobId
Edit
If I use "Copy as C=cURL(bash)" instead, the ^
characters are removed but the server doesn't like the encoding used on dates and times. e.g. T
The value '11%2F19%2F2018+12%3A15+AM' is not valid for Work Start Time
What is going on here? Can I get "Copy as cURL" to pick up my data correctly, or is there a better way to pick up the request and get it into Postman?
google-chrome-devtools postman
1
^
is a cmd batch language escape symbol. It's added when you choose "Copy as cURL (cmd)". I think this is a bug in Chrome caused by the lack of understanding that the escape is not needed inside double-quoted strings. See if you can use "Copy as cURL (bash)" instead.
– wOxxOm
Nov 19 '18 at 17:37
@wOxxOm - see my edit, it helps. But still something odd about the encoding
– Colin
Nov 19 '18 at 18:01
Might be easier to remove all those^
especially by using a scripting utility like AutoHotkey to bind Ctrl-V to a simple string replacement on clipboard when invoked in a Postman window.
– wOxxOm
Nov 20 '18 at 6:24
add a comment |
I want to use Postman to test server side validation so I used the browser to submit (valid) data to the server and in the network tab of Chromes developer tools used "Copy as cURL". Then, in Postman, Import->Paste Raw Text -> Import.
If I look at the request body the data appears on x-www-form-urlencoded
tab and every value has a '^
' character appended to it. e.g. JobId: 75051^
When I post it the server validation picks it up as invalid data e.g.
The value "75051^" is not valid for JobId
Edit
If I use "Copy as C=cURL(bash)" instead, the ^
characters are removed but the server doesn't like the encoding used on dates and times. e.g. T
The value '11%2F19%2F2018+12%3A15+AM' is not valid for Work Start Time
What is going on here? Can I get "Copy as cURL" to pick up my data correctly, or is there a better way to pick up the request and get it into Postman?
google-chrome-devtools postman
I want to use Postman to test server side validation so I used the browser to submit (valid) data to the server and in the network tab of Chromes developer tools used "Copy as cURL". Then, in Postman, Import->Paste Raw Text -> Import.
If I look at the request body the data appears on x-www-form-urlencoded
tab and every value has a '^
' character appended to it. e.g. JobId: 75051^
When I post it the server validation picks it up as invalid data e.g.
The value "75051^" is not valid for JobId
Edit
If I use "Copy as C=cURL(bash)" instead, the ^
characters are removed but the server doesn't like the encoding used on dates and times. e.g. T
The value '11%2F19%2F2018+12%3A15+AM' is not valid for Work Start Time
What is going on here? Can I get "Copy as cURL" to pick up my data correctly, or is there a better way to pick up the request and get it into Postman?
google-chrome-devtools postman
google-chrome-devtools postman
edited Nov 19 '18 at 18:00
Colin
asked Nov 19 '18 at 16:56
ColinColin
16.8k1583153
16.8k1583153
1
^
is a cmd batch language escape symbol. It's added when you choose "Copy as cURL (cmd)". I think this is a bug in Chrome caused by the lack of understanding that the escape is not needed inside double-quoted strings. See if you can use "Copy as cURL (bash)" instead.
– wOxxOm
Nov 19 '18 at 17:37
@wOxxOm - see my edit, it helps. But still something odd about the encoding
– Colin
Nov 19 '18 at 18:01
Might be easier to remove all those^
especially by using a scripting utility like AutoHotkey to bind Ctrl-V to a simple string replacement on clipboard when invoked in a Postman window.
– wOxxOm
Nov 20 '18 at 6:24
add a comment |
1
^
is a cmd batch language escape symbol. It's added when you choose "Copy as cURL (cmd)". I think this is a bug in Chrome caused by the lack of understanding that the escape is not needed inside double-quoted strings. See if you can use "Copy as cURL (bash)" instead.
– wOxxOm
Nov 19 '18 at 17:37
@wOxxOm - see my edit, it helps. But still something odd about the encoding
– Colin
Nov 19 '18 at 18:01
Might be easier to remove all those^
especially by using a scripting utility like AutoHotkey to bind Ctrl-V to a simple string replacement on clipboard when invoked in a Postman window.
– wOxxOm
Nov 20 '18 at 6:24
1
1
^
is a cmd batch language escape symbol. It's added when you choose "Copy as cURL (cmd)". I think this is a bug in Chrome caused by the lack of understanding that the escape is not needed inside double-quoted strings. See if you can use "Copy as cURL (bash)" instead.– wOxxOm
Nov 19 '18 at 17:37
^
is a cmd batch language escape symbol. It's added when you choose "Copy as cURL (cmd)". I think this is a bug in Chrome caused by the lack of understanding that the escape is not needed inside double-quoted strings. See if you can use "Copy as cURL (bash)" instead.– wOxxOm
Nov 19 '18 at 17:37
@wOxxOm - see my edit, it helps. But still something odd about the encoding
– Colin
Nov 19 '18 at 18:01
@wOxxOm - see my edit, it helps. But still something odd about the encoding
– Colin
Nov 19 '18 at 18:01
Might be easier to remove all those
^
especially by using a scripting utility like AutoHotkey to bind Ctrl-V to a simple string replacement on clipboard when invoked in a Postman window.– wOxxOm
Nov 20 '18 at 6:24
Might be easier to remove all those
^
especially by using a scripting utility like AutoHotkey to bind Ctrl-V to a simple string replacement on clipboard when invoked in a Postman window.– wOxxOm
Nov 20 '18 at 6:24
add a comment |
1 Answer
1
active
oldest
votes
I found a better way to pick up the request and get it into Postman:
- Install the Postman Chrome App instead of the desktop
app. - Install the Postman Interceptor Extension.
- Open Postman and click on the Interceptor icon in the toolbar to switch the
toggle to “on”. - Browse to your website: the requests appear in Postman's history.
- Go to Interceptor missing from native apps #1667 and vote for it
Reference:
Postman Interceptor Extension Documentation
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53379356%2fcopy-as-curlcmd-adds-invalid-characters-to-form-data%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I found a better way to pick up the request and get it into Postman:
- Install the Postman Chrome App instead of the desktop
app. - Install the Postman Interceptor Extension.
- Open Postman and click on the Interceptor icon in the toolbar to switch the
toggle to “on”. - Browse to your website: the requests appear in Postman's history.
- Go to Interceptor missing from native apps #1667 and vote for it
Reference:
Postman Interceptor Extension Documentation
add a comment |
I found a better way to pick up the request and get it into Postman:
- Install the Postman Chrome App instead of the desktop
app. - Install the Postman Interceptor Extension.
- Open Postman and click on the Interceptor icon in the toolbar to switch the
toggle to “on”. - Browse to your website: the requests appear in Postman's history.
- Go to Interceptor missing from native apps #1667 and vote for it
Reference:
Postman Interceptor Extension Documentation
add a comment |
I found a better way to pick up the request and get it into Postman:
- Install the Postman Chrome App instead of the desktop
app. - Install the Postman Interceptor Extension.
- Open Postman and click on the Interceptor icon in the toolbar to switch the
toggle to “on”. - Browse to your website: the requests appear in Postman's history.
- Go to Interceptor missing from native apps #1667 and vote for it
Reference:
Postman Interceptor Extension Documentation
I found a better way to pick up the request and get it into Postman:
- Install the Postman Chrome App instead of the desktop
app. - Install the Postman Interceptor Extension.
- Open Postman and click on the Interceptor icon in the toolbar to switch the
toggle to “on”. - Browse to your website: the requests appear in Postman's history.
- Go to Interceptor missing from native apps #1667 and vote for it
Reference:
Postman Interceptor Extension Documentation
answered Nov 20 '18 at 8:22
ColinColin
16.8k1583153
16.8k1583153
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53379356%2fcopy-as-curlcmd-adds-invalid-characters-to-form-data%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
^
is a cmd batch language escape symbol. It's added when you choose "Copy as cURL (cmd)". I think this is a bug in Chrome caused by the lack of understanding that the escape is not needed inside double-quoted strings. See if you can use "Copy as cURL (bash)" instead.– wOxxOm
Nov 19 '18 at 17:37
@wOxxOm - see my edit, it helps. But still something odd about the encoding
– Colin
Nov 19 '18 at 18:01
Might be easier to remove all those
^
especially by using a scripting utility like AutoHotkey to bind Ctrl-V to a simple string replacement on clipboard when invoked in a Postman window.– wOxxOm
Nov 20 '18 at 6:24